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

Unified Diff: test/mjsunit/regress/regress-2186.js

Issue 10532198: Fix handling of numbers in SameValue method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Drop obsolete condition completely. Created 8 years, 6 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2186.js
diff --git a/test/mjsunit/regress/regress-2034.js b/test/mjsunit/regress/regress-2186.js
similarity index 79%
copy from test/mjsunit/regress/regress-2034.js
copy to test/mjsunit/regress/regress-2186.js
index c510f97fc3030612457a72b3fa144f134e426668..0921dceadb2d0f8dc621c437aac3e064ea72b2c4 100644
--- a/test/mjsunit/regress/regress-2034.js
+++ b/test/mjsunit/regress/regress-2186.js
@@ -27,20 +27,23 @@
// Flags: --harmony-collections
-var key = {};
-var map = new WeakMap;
-Object.preventExtensions(key);
+function heapify(i) {
+ return 2.0 * (i / 2);
+}
+heapify(1);
-// Try querying using frozen key.
-assertFalse(map.has(key));
-assertSame(undefined, map.get(key));
+var ONE = 1;
+var ANOTHER_ONE = heapify(ONE);
+assertSame(ONE, ANOTHER_ONE);
+assertEquals("number", typeof ONE);
+assertEquals("number", typeof ANOTHER_ONE);
-// Try adding using frozen key.
-map.set(key, 1);
-assertTrue(map.has(key));
-assertSame(1, map.get(key));
+var set = new Set;
+set.add(ONE);
+assertTrue(set.has(ONE));
+assertTrue(set.has(ANOTHER_ONE));
-// Try deleting using frozen key.
-map.delete(key, 1);
-assertFalse(map.has(key));
-assertSame(undefined, map.get(key));
+var map = new Map;
+map.set(ONE, 23);
+assertSame(23, map.get(ONE));
+assertSame(23, map.get(ANOTHER_ONE));
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698