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/external-array.js

Issue 10697033: Extend test for external arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
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 c28bb3bcdb49a9cf3e6294b54231eafe86d12305..dd3e2fa3693ae54d4f5540b3132a523fbbee9269 100644
--- a/test/mjsunit/external-array.js
+++ b/test/mjsunit/external-array.js
@@ -475,7 +475,8 @@ assertEquals(12, a.buffer.byteLength);
assertEquals(4, a.BYTES_PER_ELEMENT);
assertEquals(1, a[0]);
assertEquals(3, a[2]);
-
+assertTrue(a.buffer instanceof ArrayBuffer);
+assertEquals(ArrayBuffer, a.buffer.constructor);
rossberg 2012/06/29 11:29:44 You can use the assertInstance helper that is defi
Yang 2012/06/29 15:06:05 Done.
// Check subarrays.
a = new Uint16Array([1,2,3,4,5,6]);
@@ -537,3 +538,8 @@ assertSame(a.buffer, aa.buffer);
assertThrows(function(){ a.subarray.call({}, 0) });
assertThrows(function(){ a.subarray.call([], 0) });
assertThrows(function(){ a.subarray.call(a) });
+
+var a = new Int32Array(10)
+var b = a.buffer
+print(b instanceof ArrayBuffer)
+print(b.constructor)
rossberg 2012/06/29 11:29:44 This probably fits better with the tests following
rossberg 2012/06/29 14:14:50 Please don't just delete this test, but have it in
Yang 2012/06/29 15:06:05 Done.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698