}
-// Harmony egal.
+// ECMA-262, Edition 6, section 19.1.2.10
function ObjectIs(obj1, obj2) {
- if (obj1 === obj2) {
- return (obj1 !== 0) || (1 / obj1 === 1 / obj2);
- } else {
- return (obj1 !== obj1) && (obj2 !== obj2);
- }
+ return SameValue(obj1, obj2);
}
assertSame(expected, Object.is(x, y));
}
-var test_set = [ {}, [], 1/0, -1/0, "s", 0, 0/-1, null, undefined ];
-print(test_set);
+var test_set = [ {}, [], Infinity, -Infinity, "s", "ア", 0, 0/-1, null,
+ undefined, true, false, Symbol("foo"), NaN ];
for (var i = 0; i < test_set.length; i++) {
for (var j = 0; j < test_set.length; j++) {
if (i == j) {