Index: test/mjsunit/regress/regress-603.js |
diff --git a/test/mjsunit/regress/regress-603.js b/test/mjsunit/regress/regress-603.js |
index 7d4c32292cea9a39e271d5a79d58efc4577ee3a2..f9344ee17ab40b058da696e12984d5f1d27fd925 100644 |
--- a/test/mjsunit/regress/regress-603.js |
+++ b/test/mjsunit/regress/regress-603.js |
@@ -29,21 +29,36 @@ |
// not mess up the stack. |
// http://code.google.com/p/v8/issues/detail?id=603 |
-function test0() { |
- var re = /b../; |
+var re = /b../; |
+assertThrows(function() { |
return re('abcdefghijklm') + 'z'; |
-} |
-assertEquals('bcdz', test0()); |
+}); |
var re1 = /c../; |
re1.call = Function.prototype.call; |
-var test1 = re1.call(null, 'abcdefghijklm') + 'z'; |
-assertEquals('cdez', test1); |
+assertThrows(function() { |
+ re1.call(null, 'abcdefghijklm') + 'z'; |
+}); |
var re2 = /d../; |
-var test2 = Function.prototype.call.call(re2, null, 'abcdefghijklm') + 'z'; |
-assertEquals('defz', test2); |
+assertThrows(function() { |
+ Function.prototype.call.call(re2, null, 'abcdefghijklm') + 'z'; |
+}); |
var re3 = /e../; |
-var test3 = Function.prototype.call.apply(re3, [null, 'abcdefghijklm']) + 'z'; |
-assertEquals('efgz', test3); |
+assertThrows(function() { |
+ Function.prototype.call.apply( |
+ re3, [null, 'abcdefghijklm']) + 'z'; |
+}); |
+ |
+var re4 = /f../; |
+assertThrows(function() { |
+ Function.prototype.apply.call( |
+ re4, null, ['abcdefghijklm']) + 'z'; |
+}); |
+ |
+var re5 = /g../; |
+assertThrows(function() { |
+ Function.prototype.apply.apply( |
+ re4, [null, ['abcdefghijklm']]) + 'z'; |
+}); |