diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js b/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js new file mode 100644 index 0000000000..96a9b52bde --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-boolean.js @@ -0,0 +1,32 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 19.1.2.10 +description: > + Object.is ( value1, value2 ) + + 7.2.9 SameValue(x, y) + + ... + 8. If Type(x) is Boolean, then + a. If x and y are both true or both false, + return true; otherwise, return false. +---*/ + +assert.sameValue(Object.is(true, false), false, "`Object.is(true, false)` returns `false`"); +assert.sameValue(Object.is(false, true), false, "`Object.is(false, true)` returns `false`"); +assert.sameValue(Object.is(true, 1), false, "`Object.is(true, 1)` returns `false`"); +assert.sameValue(Object.is(false, 0), false, "`Object.is(false, 0)` returns `false`"); +assert.sameValue(Object.is(true, {}), false, "`Object.is(true, {})` returns `false`"); +assert.sameValue(Object.is(true, undefined), false, "`Object.is(true, undefined)` returns `false`"); +assert.sameValue(Object.is(false, undefined), false, "`Object.is(false, undefined)` returns `false`"); +assert.sameValue(Object.is(true, null), false, "`Object.is(true, null)` returns `false`"); +assert.sameValue(Object.is(false, null), false, "`Object.is(false, null)` returns `false`"); +assert.sameValue(Object.is(true, NaN), false, "`Object.is(true, NaN)` returns `false`"); +assert.sameValue(Object.is(false, NaN), false, "`Object.is(false, NaN)` returns `false`"); +assert.sameValue(Object.is(true, ''), false, "`Object.is(true, '')` returns `false`"); +assert.sameValue(Object.is(false, ''), false, "`Object.is(false, '')` returns `false`"); +assert.sameValue(Object.is(true, []), false, "`Object.is(true, [])` returns `false`"); +assert.sameValue(Object.is(false, []), false, "`Object.is(false, [])` returns `false`"); + +reportCompare(0, 0); |