Index: test/mjsunit/big-object-literal.js |
diff --git a/test/mjsunit/big-object-literal.js b/test/mjsunit/big-object-literal.js |
index c937f54de17b2bb88cece568e0a88b7121b4cfdd..92c6ab7b7b278afe8d3c9d1427927f633cdba7fd 100644 |
--- a/test/mjsunit/big-object-literal.js |
+++ b/test/mjsunit/big-object-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; |