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

Unified Diff: test/mjsunit/object-freeze.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-define-property.js ('k') | test/mjsunit/object-literal.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-freeze.js
diff --git a/test/mjsunit/object-freeze.js b/test/mjsunit/object-freeze.js
index 3eefffda311a2dfc9490b9e04a09eb1645c04c1f..c3a9278bbd9c4629489f143e52cedba78684ddb4 100644
--- a/test/mjsunit/object-freeze.js
+++ b/test/mjsunit/object-freeze.js
@@ -32,21 +32,25 @@
// Test that we throw an error if an object is not passed as argument.
var non_objects = new Array(undefined, null, 1, -1, 0, 42.43);
for (var key in non_objects) {
+ var exception = false;
try {
Object.freeze(non_objects[key]);
- assertUnreachable();
} catch(e) {
+ exception = true;
assertTrue(/Object.freeze called on non-object/.test(e));
}
+ assertTrue(exception);
}
for (var key in non_objects) {
+ exception = false;
try {
Object.isFrozen(non_objects[key]);
- assertUnreachable();
} catch(e) {
+ exception = true;
assertTrue(/Object.isFrozen called on non-object/.test(e));
}
+ assertTrue(exception);
}
// Test normal data properties.
« no previous file with comments | « test/mjsunit/object-define-property.js ('k') | test/mjsunit/object-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698