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

Unified Diff: test/mjsunit/wasm/wasm-constants.js

Issue 2410763002: [wasm] GrowMemory should use maximum size declared in WebAssembly.Memory (Closed)
Patch Set: Formatting 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
« test/mjsunit/wasm/import-memory.js ('K') | « test/mjsunit/wasm/import-memory.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/wasm-constants.js
diff --git a/test/mjsunit/wasm/wasm-constants.js b/test/mjsunit/wasm/wasm-constants.js
index e4febc1e63f2a4e7296c3577166dc8b11c512ae9..903e650c4e7c02cb1e15ce49930bf78923c8683f 100644
--- a/test/mjsunit/wasm/wasm-constants.js
+++ b/test/mjsunit/wasm/wasm-constants.js
@@ -373,3 +373,18 @@ function assertWasmThrows(value, code) {
}
throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);
}
+
+function assertWasmError(code) {
+ try {
bradnelson 2016/10/17 22:13:25 Intent is weird here.
bradnelson 2016/10/17 22:23:26 Indent I mean
gdeepti 2016/10/18 02:34:17 Removed this function because assertThrows covers
+ if (typeof code === 'function') {
+ code();
+ } else {
+ eval(code);
+ }
+ } catch (e) {
+ assertEquals("object", typeof e);
+ // Success
+ return;
+ }
+ throw new MjsUnitAssertionError("Did not throw, expected error");
+}
« test/mjsunit/wasm/import-memory.js ('K') | « test/mjsunit/wasm/import-memory.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698