mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
Bug 637643 - Tests. r=async.processingjs@yahoo.com
--HG-- extra : rebase_source : 190f79659ffb1305726347310d6c7bb4f4f7d2b1
This commit is contained in:
parent
0915122f89
commit
9c2000bde9
@ -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
|
||||
|
@ -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!");
|
Loading…
Reference in New Issue
Block a user