diff options
Diffstat (limited to 'deps/v8/test/mjsunit/samevalue.js')
-rw-r--r-- | deps/v8/test/mjsunit/samevalue.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/samevalue.js b/deps/v8/test/mjsunit/samevalue.js index 356e888016..1e5384d73d 100644 --- a/deps/v8/test/mjsunit/samevalue.js +++ b/deps/v8/test/mjsunit/samevalue.js @@ -32,8 +32,11 @@ var obj1 = {x: 10, y: 11, z: "test"}; var obj2 = {x: 10, y: 11, z: "test"}; +// Object.is() uses the SameValue algorithm. var sameValue = Object.is; -var sameValueZero = function(x, y) { return %SameValueZero(x, y); } + +// Set#has() uses the SameValueZero algorithm. +var sameValueZero = (x, y) => new Set([x]).has(y); // Calls SameValue and SameValueZero and checks that their results match. function sameValueBoth(a, b) { |