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

Unified Diff: test/mjsunit/external-array.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 | « no previous file | test/mjsunit/external-array-no-sse2.js » ('j') | test/mjsunit/external-array-no-sse2.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/external-array.js
diff --git a/test/mjsunit/external-array.js b/test/mjsunit/external-array.js
index 85a8cc584724d2e3e11a4953607893153193f27f..3108c3bf193183d14e37eacc03bb1991aeccfb79 100644
--- a/test/mjsunit/external-array.js
+++ b/test/mjsunit/external-array.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);
-
// Test derivation from an ArrayBuffer
var ab = new ArrayBuffer(12);
assertInstance(ab, ArrayBuffer);
@@ -161,12 +155,9 @@ 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;
-assertEquals(42, a.BYTES_PER_ELEMENT);
a = new Uint8Array(2);
assertEquals(1, a.BYTES_PER_ELEMENT);
a = new Int16Array(2);
@@ -202,15 +193,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);
-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 +341,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);
// Make sure bounds checks are handled correctly for external arrays.
run_bounds_test(a);
@@ -452,7 +432,6 @@ assertEquals(0, a.length);
a[0] = 1;
assertEquals(undefined, a[0]);
-
// Check construction from arrays.
a = new Uint32Array([]);
assertInstance(a, Uint32Array);
@@ -539,8 +518,6 @@ assertSame(a.buffer, aa.buffer);
assertThrows(function(){ a.subarray.call({}, 0) });
assertThrows(function(){ a.subarray.call([], 0) });
-assertThrows(function(){ a.subarray.call(a) });
-
// Call constructors directly as functions, and through .call and .apply
« no previous file with comments | « no previous file | test/mjsunit/external-array-no-sse2.js » ('j') | test/mjsunit/external-array-no-sse2.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698