| 1 |
// Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 19.1.2.10 |
| 5 |
description: > |
| 6 |
Object.is ( value1, value2 ) |
| 7 |
|
| 8 |
... |
| 9 |
10. Return true if x and y are the same Object value. Otherwise, return false. |
| 10 |
---*/ |
| 11 |
|
| 12 |
var a = {}; |
| 13 |
var b = Object(0); |
| 14 |
var c = new Object(""); |
| 15 |
var d = []; |
| 16 |
var e = Array(); |
| 17 |
var f = new Array(); |
| 18 |
|
| 19 |
assert.sameValue(Object.is(a, a), true, "`Object.is(a, a)` returns `true`"); |
| 20 |
assert.sameValue(Object.is(b, b), true, "`Object.is(b, b)` returns `true`"); |
| 21 |
assert.sameValue(Object.is(c, c), true, "`Object.is(c, c)` returns `true`"); |
| 22 |
assert.sameValue(Object.is(d, d), true, "`Object.is(d, d)` returns `true`"); |
| 23 |
assert.sameValue(Object.is(e, e), true, "`Object.is(e, e)` returns `true`"); |
| 24 |
assert.sameValue(Object.is(f, f), true, "`Object.is(f, f)` returns `true`"); |