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]); |
-} |
+} |