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

Unified Diff: test/mjsunit/external-array-no-sse2.js

Issue 14580012: Update mjsunit tests to be complaint with ES6 implementation of typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/external-array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/external-array-no-sse2.js
diff --git a/test/mjsunit/external-array-no-sse2.js b/test/mjsunit/external-array-no-sse2.js
index 0b843d865f728fbd98a8e44ca0b2db68dd06b72d..b3d91a534c0ef450fa5b090dce6370cab1c4f6a9 100644
--- a/test/mjsunit/external-array-no-sse2.js
+++ b/test/mjsunit/external-array-no-sse2.js
@@ -49,12 +49,6 @@ f(a);
assertEquals(0, a[0]);
assertEquals(0, a[1]);
-// No-parameter constructor should fail right now.
-function abfunc1() {
- return new ArrayBuffer();
-}
-assertThrows(abfunc1);
-
Dmitry Lomov (no reviews) 2013/05/07 13:21:29 This does not fail per ES6 spec
// Test derivation from an ArrayBuffer
var ab = new ArrayBuffer(12);
assertInstance(ab, ArrayBuffer);
@@ -161,12 +155,10 @@ assertSame(a.buffer, (new Float32Array(a.buffer,4)).buffer);
assertSame(a.buffer, (new Int8Array(a.buffer,3,51)).buffer);
assertInstance(a.buffer, ArrayBuffer);
-// Test the correct behavior of the |BYTES_PER_ELEMENT| property (which is
-// "constant", but not read-only).
+// Test the correct behavior of the |BYTES_PER_ELEMENT| property.
a = new Int32Array(2);
assertEquals(4, a.BYTES_PER_ELEMENT);
a.BYTES_PER_ELEMENT = 42;
rossberg 2013/05/07 13:58:05 Did you want to remove this line, too?
-assertEquals(42, a.BYTES_PER_ELEMENT);
Dmitry Lomov (no reviews) 2013/05/07 13:21:29 Property is readonly per ES6 spec.
a = new Uint8Array(2);
assertEquals(1, a.BYTES_PER_ELEMENT);
a = new Int16Array(2);
@@ -202,15 +194,6 @@ assertEquals(3.5, get(array, 1));
// Test non-number parameters.
var array_with_length_from_non_number = new Int32Array("2");
assertEquals(2, array_with_length_from_non_number.length);
-array_with_length_from_non_number = new Int32Array(undefined);
Dmitry Lomov (no reviews) 2013/05/07 13:21:29 Spec is currently unclear on what should happen fo
-assertEquals(0, array_with_length_from_non_number.length);
-var foo = { valueOf: function() { return 3; } };
-array_with_length_from_non_number = new Int32Array(foo);
-assertEquals(3, array_with_length_from_non_number.length);
-foo = { toString: function() { return "4"; } };
-array_with_length_from_non_number = new Int32Array(foo);
-assertEquals(4, array_with_length_from_non_number.length);
-
// Test loads and stores.
types = [Array, Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array,
@@ -359,8 +342,6 @@ for (var t = 0; t < types.length; t++) {
a.length = 2;
assertEquals(kElementCount, a.length);
assertTrue(delete a.length);
- a.length = 2;
- assertEquals(2, a.length);
Dmitry Lomov (no reviews) 2013/05/07 13:21:29 'length' is now a property on the prototype so del
// Make sure bounds checks are handled correctly for external arrays.
run_bounds_test(a);
@@ -539,8 +520,6 @@ assertSame(a.buffer, aa.buffer);
assertThrows(function(){ a.subarray.call({}, 0) });
assertThrows(function(){ a.subarray.call([], 0) });
-assertThrows(function(){ a.subarray.call(a) });
-
Dmitry Lomov (no reviews) 2013/05/07 13:21:29 a.subarray() is a valid call per ES6 (returns a co
// Call constructors directly as functions, and through .call and .apply
« no previous file with comments | « test/mjsunit/external-array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698