same-value-x-y-boolean.js (588B)
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 7.2.9 SameValue(x, y) 9 10 ... 11 8. If Type(x) is Boolean, then 12 a. If x and y are both true or both false, 13 return true; otherwise, return false. 14 ---*/ 15 16 assert.sameValue(Object.is(true, true), true, "`Object.is(true, true)` returns `true`"); 17 assert.sameValue(Object.is(false, false), true, "`Object.is(false, false)` returns `true`"); 18 19 reportCompare(0, 0);