Index: test/mjsunit/big-array-literal.js |
diff --git a/test/mjsunit/big-array-literal.js b/test/mjsunit/big-array-literal.js |
index 9f0617989caf3a934f48ccde68e5d35c117ea252..13f91f855e1824531b2e10f2427b869e6b848252 100644 |
--- a/test/mjsunit/big-array-literal.js |
+++ b/test/mjsunit/big-array-literal.js |
@@ -92,16 +92,25 @@ for (var i = 0; i < sizes.length; i++) { |
testLiteral(sizes[i], true); |
} |
+ |
+function checkExpectedException(e) { |
+ assertInstanceof(e, RangeError); |
+ assertTrue(e.message.indexOf("Maximum call stack size exceeded") >= 0); |
+} |
+ |
+ |
function testLiteralAndCatch(size) { |
var big_enough = false; |
try { |
testLiteral(size, false); |
} catch (e) { |
+ checkExpectedException(e); |
big_enough = true; |
} |
try { |
testLiteral(size, true); |
} catch (e) { |
+ checkExpectedException(e); |
big_enough = true; |
} |
return big_enough; |