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

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

Issue 670623003: Handle property name "-0" correctly for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: And another test for sloppy mode Created 6 years, 2 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/lookup.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/typedarrays.js
diff --git a/test/mjsunit/harmony/typedarrays.js b/test/mjsunit/harmony/typedarrays.js
index c70d8e5ea4b82371d7570bafdac12585885ccf6c..a2f3dccc7a11442808a4511c8ae2a98c75b2238b 100644
--- a/test/mjsunit/harmony/typedarrays.js
+++ b/test/mjsunit/harmony/typedarrays.js
@@ -500,6 +500,13 @@ function TestTypedArraysWithIllegalIndices() {
assertEquals(10, a["-1e2"]);
assertEquals(undefined, a[-1e2]);
+ a["-0"] = 256;
+ var s2 = " -0";
+ a[s2] = 255;
+ assertEquals(undefined, a["-0"]);
+ assertEquals(255, a[s2]);
+ assertEquals(0, a[-0]);
+
/* Chromium bug: 424619
* a[-Infinity] = 50;
* assertEquals(undefined, a[-Infinity]);
@@ -542,6 +549,13 @@ function TestTypedArraysWithIllegalIndicesStrict() {
assertEquals(10, a["-1e2"]);
assertEquals(undefined, a[-1e2]);
+ a["-0"] = 256;
+ var s2 = " -0";
+ a[s2] = 255;
+ assertEquals(undefined, a["-0"]);
+ assertEquals(255, a[s2]);
+ assertEquals(0, a[-0]);
+
/* Chromium bug: 424619
* a[-Infinity] = 50;
* assertEquals(undefined, a[-Infinity]);
« no previous file with comments | « src/lookup.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698