summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js')
-rw-r--r--js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js b/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js
new file mode 100644
index 0000000000..38aeba6e09
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/is/not-same-value-x-y-object.js
@@ -0,0 +1,34 @@
+// 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 )
+
+ ...
+ 10. Return true if x and y are the same Object value. Otherwise, return false.
+---*/
+
+assert.sameValue(Object.is({}, {}), false, "`Object.is({}, {})` returns `false`");
+assert.sameValue(
+ Object.is(Object(), Object()),
+ false,
+ "`Object.is(Object(), Object())` returns `false`"
+);
+assert.sameValue(
+ Object.is(new Object(), new Object()),
+ false,
+ "`Object.is(new Object(), new Object())` returns `false`"
+);
+assert.sameValue(
+ Object.is(Object(0), Object(0)),
+ false,
+ "`Object.is(Object(0), Object(0))` returns `false`"
+);
+assert.sameValue(
+ Object.is(new Object(''), new Object('')),
+ false,
+ "`Object.is(new Object(''), new Object(''))` returns `false`"
+);
+
+reportCompare(0, 0);