Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Unified Diff: test/mjsunit/regress/regress-1170.js

Issue 7053035: Fix a number of tests that incorrectly used assertUnreachable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/regress/regress-1160.js ('k') | test/mjsunit/regress/regress-1172-bis.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/mjsunit/regress/regress-1160.js ('k') | test/mjsunit/regress/regress-1172-bis.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698