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

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

Issue 18769005: Allow parameterless typed array constructors. (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
« no previous file with comments | « src/typedarray.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 e1b0e653d602e8fde9094ab8656d5fc476b39a25..99364c8101757a2b3b178807e3a88e22664adbd4 100644
--- a/test/mjsunit/harmony/typedarrays.js
+++ b/test/mjsunit/harmony/typedarrays.js
@@ -219,7 +219,6 @@ function TestTypedArray(proto, elementSize, typicalElement) {
assertThrows(function() { new proto(unalignedArrayBuffer)}, RangeError);
assertThrows(function() { new proto(unalignedArrayBuffer, 5*elementSize)},
RangeError);
- assertThrows(function() { new proto() }, TypeError);
}
var aFromString = new proto("30");
@@ -250,6 +249,12 @@ function TestTypedArray(proto, elementSize, typicalElement) {
assertSame(0, aOverAbLen0.length);
assertSame(0, aOverAbLen0.byteLength);
assertSame(0, aOverAbLen0.byteOffset);
+
+ var aNoParam = new proto();
+ assertSame(elementSize, aNoParam.BYTES_PER_ELEMENT);
+ assertSame(0, aNoParam.length);
+ assertSame(0, aNoParam.byteLength);
+ assertSame(0, aNoParam.byteOffset);
}
TestTypedArray(Uint8Array, 1, 0xFF);
« no previous file with comments | « src/typedarray.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698