1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/auto-regress/bug770713.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +// Binary: cache/js-dbg-32-b39f4007be5a-linux 1.5 +// Flags: -m -n -a 1.6 +// 1.7 + 1.8 +gczeal(4); 1.9 +var a = ['a','test string',456,9.34,new String("string object"),[],['h','i','j','k']]; 1.10 +var b = [1,2,3,4,5,6,7,8,9,0]; 1.11 +exhaustiveSliceTest("exhaustive slice test 1", a); 1.12 +function mySlice(a, from, to) { 1.13 + var returnArray = []; 1.14 + try { } catch ( [ x ] ) { } finally { } 1.15 + return returnArray; 1.16 +} 1.17 +function exhaustiveSliceTest(testname, a) { 1.18 + var x = 0; 1.19 + for (y = (2 + a.length); y >= -(2 + a.length); y--) { 1.20 + var c = mySlice(a,x,y); 1.21 + if (String(b) != String(c)) 1.22 + " expected result: " + String(c) + "\n"; 1.23 + } 1.24 +}