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

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

Issue 19210002: Throw if first argument to TypedArray.set is a number. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« src/typedarray.js ('K') | « test/mjsunit/external-array-no-sse2.js ('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 8e8ec5748b472a9c47061da7546c713103992b5f..4465aafbba78127110b2191519b1e492f7bf87ad 100644
--- a/test/mjsunit/harmony/typedarrays.js
+++ b/test/mjsunit/harmony/typedarrays.js
@@ -458,12 +458,13 @@ function TestTypedArraySet() {
a[i] = i;
expected.push(i);
}
- a.set(0);
- assertArrayPrefix(expected, a);
a.set({});
assertArrayPrefix(expected, a);
assertThrows(function() { a.set.call({}) }, TypeError);
assertThrows(function() { a.set.call([]) }, TypeError);
+
+ assertThrows(function() { a.set(0); }, TypeError);
+ assertThrows(function() { a.set(0, 1); }, TypeError);
}
TestTypedArraySet();
« src/typedarray.js ('K') | « test/mjsunit/external-array-no-sse2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698