diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js new file mode 100644 index 0000000000..4809af3dc6 --- /dev/null +++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js @@ -0,0 +1,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(false) + +assert.sameValue(s.has(false), true, "`s.has(false)` returns `true`"); + +reportCompare(0, 0); |