summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-number.js
blob: 1831aaa35f9f896e8cbee43dea67fca12bf271ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-set.prototype.has
description: >
    Set.prototype.has ( value )

    ...
    5. Repeat for each e that is an element of entries,
      a. If e is not empty and SameValueZero(e, value) is true, return true.
    ...

---*/

var s = new Set();

s.add(0)

assert.sameValue(s.has(0), true, "`s.has(0)` returns `true`");

reportCompare(0, 0);