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

Unified Diff: test/mjsunit/mjsunit.js

Issue 2404253002: [wasm] Provide better stack traces for asm.js code (Closed)
Patch Set: Address titzer's comments 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 | « test/common/wasm/wasm-module-runner.cc ('k') | test/mjsunit/wasm/asm-wasm-stack.js » ('j') | 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 6a7c2da9e47d1ca56b52c98b3afbd2a2b6d72b6c..86052ee0a108fb377ad97f4cde220d26afe82bb2 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -117,6 +117,9 @@ var assertUnoptimized;
// Assert that a string contains another expected substring.
var assertContains;
+// Assert that a string matches a given regex.
+var assertMatches;
+
(function () { // Scope for utility functions.
@@ -425,6 +428,15 @@ var assertContains;
}
};
+ assertMatches = function(regexp, str, name_opt) {
+ if (!(regexp instanceof RegExp)) {
+ regexp = new RegExp(regexp);
+ }
+ if (!str.match(regexp)) {
+ fail("should match '" + regexp + "'", str, name_opt);
+ }
+ };
+
var OptimizationStatusImpl = undefined;
var OptimizationStatus = function(fun, sync_opt) {
« no previous file with comments | « test/common/wasm/wasm-module-runner.cc ('k') | test/mjsunit/wasm/asm-wasm-stack.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698