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

Unified Diff: test/mjsunit/mjsunit.js

Issue 1875153002: [wasm] Also test structured stack trace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-throw-error
Patch Set: fix assertContains helper function Created 4 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 | « no previous file | test/mjsunit/wasm/stack.js » ('j') | test/mjsunit/wasm/stack.js » ('J')
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 9b07953c8aa22a24cd1386e1f212027dab0c7e2f..f3eda9f12d0d6dc1f6dd7e0cd546bf8b307de888 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -114,6 +114,9 @@ var assertUnreachable;
var assertOptimized;
var assertUnoptimized;
+// Assert that a string contains another expected substring.
+var assertContains;
+
(function () { // Scope for utility functions.
@@ -416,6 +419,12 @@ var assertUnoptimized;
throw new MjsUnitAssertionError(message);
};
+ assertContains = function(value, sub, name_opt) {
+ if (value == null ? (sub != null) : value.indexOf(sub) == -1) {
+ fail("contains '" + String(sub) + "'", value, name_opt);
+ }
+ };
+
var OptimizationStatusImpl = undefined;
var OptimizationStatus = function(fun, sync_opt) {
« no previous file with comments | « no previous file | test/mjsunit/wasm/stack.js » ('j') | test/mjsunit/wasm/stack.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698