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

Unified Diff: test/mjsunit/object-literal.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/object-freeze.js ('k') | test/mjsunit/object-seal.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-literal.js
diff --git a/test/mjsunit/object-literal.js b/test/mjsunit/object-literal.js
index 397d67064409fe4a66635c913a288c6531151f7b..5dcbb3bc7c9c08d52bbe192904f104dddfbbdd44 100644
--- a/test/mjsunit/object-literal.js
+++ b/test/mjsunit/object-literal.js
@@ -141,11 +141,14 @@ var keywords = [
];
function testKeywordProperty(keyword) {
+ var exception = false;
try {
// Sanity check that what we get is a keyword.
eval("var " + keyword + " = 42;");
- assertUnreachable("Not a keyword: " + keyword);
- } catch (e) { }
+ } catch (e) {
+ exception = true;
+ }
+ assertTrue(exception);
// Simple property, read and write.
var x = eval("({" + keyword + ": 42})");
@@ -187,4 +190,4 @@ function testKeywordProperty(keyword) {
for (var i = 0; i < keywords.length; i++) {
testKeywordProperty(keywords[i]);
-}
+}
« no previous file with comments | « test/mjsunit/object-freeze.js ('k') | test/mjsunit/object-seal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698