Index: test/mjsunit/harmony/collections.js |
diff --git a/test/mjsunit/harmony/collections.js b/test/mjsunit/harmony/collections.js |
index 04a5cdca369bddfe2d0aab63ee1e0662ba5512fd..7e95b9e110749f3b83efddef13c8c092d8adc714 100644 |
--- a/test/mjsunit/harmony/collections.js |
+++ b/test/mjsunit/harmony/collections.js |
@@ -484,3 +484,25 @@ for (var i = 9; i >= 0; i--) { |
w.clear(); |
assertFalse(w.has(k)); |
})(); |
+ |
+ |
+(function TestMinusZeroSet() { |
+ var m = new Set(); |
+ m.add(0); |
+ m.add(-0); |
+ assertEquals(1, m.size); |
+ assertTrue(m.has(0)); |
+ assertTrue(m.has(-0)); |
+})(); |
+ |
+ |
+(function TestMinusZeroMap() { |
+ var m = new Map(); |
+ m.set(0, 'plus'); |
+ m.set(-0, 'minus'); |
+ assertEquals(1, m.size); |
+ assertTrue(m.has(0)); |
+ assertTrue(m.has(-0)); |
+ assertEquals('minus', m.get(0)); |
+ assertEquals('minus', m.get(-0)); |
+})(); |