Index: test/mjsunit/regress/regress-1170.js |
diff --git a/test/mjsunit/regress/regress-1170.js b/test/mjsunit/regress/regress-1170.js |
index 2ed7458782b8bb2120d1dd1992993faca1ec22bf..95684c5418a1809a6c94afcaf809a764c20627ea 100644 |
--- a/test/mjsunit/regress/regress-1170.js |
+++ b/test/mjsunit/regress/regress-1170.js |
@@ -42,24 +42,31 @@ eval("function a() {}"); |
assertTrue(this.hasOwnProperty("a")); |
__proto__.__defineSetter__("b", function(v) { assertUnreachable(); }); |
+var exception = false; |
try { |
eval("const b = 23"); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/TypeError/.test(e)); |
} |
+assertTrue(exception); |
+ |
+exception = false; |
try { |
eval("with({}) { eval('const b = 23') }"); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertTrue(/TypeError/.test(e)); |
} |
+assertTrue(exception); |
__proto__.__defineSetter__("c", function(v) { throw 42; }); |
+exception = false; |
try { |
eval("var c = 1"); |
- assertUnreachable(); |
} catch(e) { |
+ exception = true; |
assertEquals(42, e); |
assertFalse(this.hasOwnProperty("c")); |
} |
+assertTrue(exception); |