Chromium Code Reviews

Unified Diff: test/intl/assert.js

Issue 1875153002: [wasm] Also test structured stack trace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-throw-error
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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/intl/assert.js
diff --git a/test/intl/assert.js b/test/intl/assert.js
index e17615267ae327ea25b60db0a67e99d11fbb6a49..8af48fa44c6e4a35cca6a511f9b300249bdb1c3a 100644
--- a/test/intl/assert.js
+++ b/test/intl/assert.js
@@ -109,6 +109,16 @@ function assertEquals(expected, found, user_message = '') {
/**
+ * Throws if value does not contain sub.
+ */
+function assertContains(value, sub, user_message = '') {
+ if (value == null ? (sub != null) : value.indexOf(sub) == -1) {
+ fail("contains '" + String(sub) + "'", value, user_message);
+ }
+}
+
+
+/**
* Throws if value is false.
*/
function assertTrue(value, user_message = '') {
« 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