Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: test/mjsunit/harmony/collections.js

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/getters-on-elements.js ('k') | test/mjsunit/harmony/math-cbrt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+})();
« no previous file with comments | « test/mjsunit/getters-on-elements.js ('k') | test/mjsunit/harmony/math-cbrt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698