--HG--
extra : rebase_source : 190f79659ffb1305726347310d6c7bb4f4f7d2b1
This commit is contained in:
Jeff Walden 2011-03-14 10:17:40 -07:00
parent 0915122f89
commit 9c2000bde9
2 changed files with 34 additions and 0 deletions

View File

@ -1,6 +1,7 @@
url-prefix ../../jsreftest.html?test=js1_8_5/extensions/
script typedarray.js
script typedarray-prototype.js
script typedarray-subarray-of-subarray.js
skip-if(!xulRuntime.shell) script worker-error.js # these tests sometimes hang in browser, bug 559954, bug 562333
skip-if(!xulRuntime.shell) script worker-error-propagation.js
skip-if(!xulRuntime.shell) script worker-fib.js

View File

@ -0,0 +1,33 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
//-----------------------------------------------------------------------------
var BUGNUMBER = 637643;
var summary =
"new Int8Array([1, 2, 3]).subarray(1).subarray(1)[0] === 3";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var ta = new Int8Array([1, 2, 3]);
assertEq(ta.length, 3);
assertEq(ta[0], 1);
assertEq(ta[1], 2);
assertEq(ta[2], 3);
var sa1 = ta.subarray(1);
assertEq(sa1.length, 2);
assertEq(sa1[0], 2);
assertEq(sa1[1], 3);
var sa2 = sa1.subarray(1);
assertEq(sa2.length, 1);
assertEq(sa2[0], 3);
if (typeof reportCompare === "function")
reportCompare(true, true);
print("All tests passed!");