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

Unified Diff: test/mjsunit/object-seal.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-literal.js ('k') | test/mjsunit/property-load-across-eval.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-seal.js
diff --git a/test/mjsunit/object-seal.js b/test/mjsunit/object-seal.js
index fb9bb9215978b6f228e229b9415832b3b0ecf8ab..f21baed37711d954d309bc9009d534c998583778 100644
--- a/test/mjsunit/object-seal.js
+++ b/test/mjsunit/object-seal.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.seal(non_objects[key]);
- assertUnreachable();
} catch(e) {
+ exception = true;
assertTrue(/Object.seal called on non-object/.test(e));
}
+ assertTrue(exception);
}
for (var key in non_objects) {
+ exception = false;
try {
Object.isSealed(non_objects[key]);
- assertUnreachable();
} catch(e) {
+ exception = true;
assertTrue(/Object.isSealed called on non-object/.test(e));
}
+ assertTrue(exception);
}
// Test normal data properties.
« no previous file with comments | « test/mjsunit/object-literal.js ('k') | test/mjsunit/property-load-across-eval.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698