summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNegativeArrayLength.js
blob: 1719ceeb970b2908436bfe5f06acc67a30bfbadd (plain)
1
2
3
4
5
6
7
8
9
10
function f() {
    try {
	for ( var i = 7; i > -2; i-- )
	    new Array(i).join('*');
    } catch (e) {
	return e instanceof RangeError;
    }
    return false;
}
assertEq(f(), true);