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

Unified Diff: test/webkit/resources/standalone-pre.js

Issue 1109783003: Import JSC class tests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 8 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/webkit/class-syntax-super-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/resources/standalone-pre.js
diff --git a/test/webkit/resources/standalone-pre.js b/test/webkit/resources/standalone-pre.js
index 5f164dbcb54029f941b1f2117f6b0f87b22e8a36..3c94dd64c13f9814fd3de1864d18d19afe2fb33f 100644
--- a/test/webkit/resources/standalone-pre.js
+++ b/test/webkit/resources/standalone-pre.js
@@ -89,9 +89,12 @@ function isResultCorrect(_actual, _expected)
function stringify(v)
{
+ if (v)
+ return v.toString();
if (v === 0 && 1/v < 0)
return "-0";
- else return "" + v;
+ else
+ return "" + v;
}
function shouldBe(_a, _b)
@@ -114,7 +117,7 @@ function shouldBe(_a, _b)
else if (typeof(_av) == typeof(_bv))
testFailed(_a + " should be " + _bv + ". Was " + stringify(_av) + ".");
else
- testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
+ testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + stringify(_av) + " (of type " + typeof _av + ").");
}
function shouldBeTrue(_a) { shouldBe(_a, "true"); }
@@ -171,7 +174,18 @@ function shouldThrow(_a, _e)
} else if (typeof _av == "undefined")
testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was undefined.");
else
- testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + _av + ".");
+ testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + stringify(_av) + ".");
+}
+
+
+function shouldNotThrow(_a)
+{
+ try {
+ eval(_a);
+ testPassed(_a + " did not throw exception.");
+ } catch (e) {
+ testFailed(_a + " should not throw exception. Threw exception " + e + ".");
+ }
}
function isSuccessfullyParsed()
« no previous file with comments | « test/webkit/class-syntax-super-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698