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

Side by Side Diff: test/mjsunit/harmony/typedarrays.js

Issue 212603014: Inline internal getters for typed arrays & friends. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix ApiObjectGroupsCycleForScavenger test Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 SubarrayTestCase(constructor, item, 10,0, 100, "abc", 10); 303 SubarrayTestCase(constructor, item, 10,0, 100, "abc", 10);
304 304
305 SubarrayTestCase(constructor, item, 10,0, 100, 0.96, 10.96); 305 SubarrayTestCase(constructor, item, 10,0, 100, 0.96, 10.96);
306 SubarrayTestCase(constructor, item, 10,0, 100, 0.96, 10.01); 306 SubarrayTestCase(constructor, item, 10,0, 100, 0.96, 10.01);
307 SubarrayTestCase(constructor, item, 10,0, 100, 0.01, 10.01); 307 SubarrayTestCase(constructor, item, 10,0, 100, 0.01, 10.01);
308 SubarrayTestCase(constructor, item, 10,0, 100, 0.01, 10.96); 308 SubarrayTestCase(constructor, item, 10,0, 100, 0.01, 10.96);
309 309
310 310
311 SubarrayTestCase(constructor, item, 10,90, 100, 90); 311 SubarrayTestCase(constructor, item, 10,90, 100, 90);
312 SubarrayTestCase(constructor, item, 10,90, 100, -10); 312 SubarrayTestCase(constructor, item, 10,90, 100, -10);
313
314 var method = constructor.prototype.subarray;
315 method.call(new constructor(100), 0, 100);
316 var o = {};
317 assertThrows(function() { method.call(o, 0, 100); }, TypeError);
313 } 318 }
314 319
315 TestSubArray(Uint8Array, 0xFF); 320 TestSubArray(Uint8Array, 0xFF);
316 TestSubArray(Int8Array, -0x7F); 321 TestSubArray(Int8Array, -0x7F);
317 TestSubArray(Uint16Array, 0xFFFF); 322 TestSubArray(Uint16Array, 0xFFFF);
318 TestSubArray(Int16Array, -0x7FFF); 323 TestSubArray(Int16Array, -0x7FFF);
319 TestSubArray(Uint32Array, 0xFFFFFFFF); 324 TestSubArray(Uint32Array, 0xFFFFFFFF);
320 TestSubArray(Int32Array, -0x7FFFFFFF); 325 TestSubArray(Int32Array, -0x7FFFFFFF);
321 TestSubArray(Float32Array, 0.5); 326 TestSubArray(Float32Array, 0.5);
322 TestSubArray(Float64Array, 0.5); 327 TestSubArray(Float64Array, 0.5);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 TestArbitrary(new ArrayBuffer(256)); 580 TestArbitrary(new ArrayBuffer(256));
576 for(i = 0; i < typedArrayConstructors.lenght; i++) { 581 for(i = 0; i < typedArrayConstructors.lenght; i++) {
577 TestArbitary(new typedArrayConstructors[i](10)); 582 TestArbitary(new typedArrayConstructors[i](10));
578 } 583 }
579 TestArbitrary(new DataView(new ArrayBuffer(256))); 584 TestArbitrary(new DataView(new ArrayBuffer(256)));
580 585
581 586
582 // Test direct constructor call 587 // Test direct constructor call
583 assertThrows(function() { ArrayBuffer(); }, TypeError); 588 assertThrows(function() { ArrayBuffer(); }, TypeError);
584 assertThrows(function() { DataView(new ArrayBuffer()); }, TypeError); 589 assertThrows(function() { DataView(new ArrayBuffer()); }, TypeError);
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698