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

Unified Diff: test/mjsunit/mjsunit.js

Issue 2421033003: Revert of mjsunit: Fix the error message produced by assertInstanceof. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/mjsunit.js
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index d56a22701af1af56d119382c23ab6b734b9b4f02..86052ee0a108fb377ad97f4cde220d26afe82bb2 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -206,16 +206,13 @@
function fail(expectedText, found, name_opt) {
var message = "Fail" + "ure";
- if (found) {
- message += ": expected <" + expectedText +
- "> found <" + PrettyPrint(found) + ">";
- if (name_opt) {
- // Fix this when we ditch the old test runner.
- message += " (" + name_opt + ")";
- }
- } else {
- message += ": " + expectedText;
- }
+ if (name_opt) {
+ // Fix this when we ditch the old test runner.
+ message += " (" + name_opt + ")";
+ }
+
+ message += ": expected <" + expectedText +
+ "> found <" + PrettyPrint(found) + ">";
throw new MjsUnitAssertionError(message);
}
@@ -399,7 +396,7 @@
}
fail("Object <" + PrettyPrint(obj) + "> is not an instance of <" +
(type.name || type) + ">" +
- (actualTypeName ? " but of <" + actualTypeName + ">" : ""));
+ (actualTypeName ? " but of < " + actualTypeName + ">" : ""));
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698