summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/ion/bug882323.js
blob: 010e8e7335a634a60800114f54afea0ecc1730bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var ints = new Int8Array(16);
ints[0] = 42;
function intElementAt(index) {
    return ints[index];
}
assertEq(intElementAt(16), undefined);
assertEq(intElementAt(0), 42);

var floats = new Float64Array(16);
floats[0] = 3.14;
function floatElementAt(index) {
    return floats[index];
}
assertEq(floatElementAt(16), undefined);
assertEq(floatElementAt(0), 3.14);

var uints = new Uint32Array(16);
uints[0] = 123;
function uintElementAt(index) {
    return uints[index];
}
assertEq(uintElementAt(16), undefined);
assertEq(uintElementAt(0), 123);