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

Unified Diff: test/cctest/wasm/test-run-wasm.cc

Issue 2391223002: Revert of [wasm] Call a runtime function for a MemorySize instruction. (Closed)
Patch Set: 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 | « src/runtime/runtime-wasm.cc ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index 38c4769b69345b823f114a1fa231e94f6fa3b1e5..422ced9be95ab6108041a21140bc0bcfbe93c0d0 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -77,6 +77,22 @@
BUILD(r, WASM_I32V(kExpectedValue));
CHECK_EQ(kExpectedValue, r.Call());
}
+}
+
+WASM_EXEC_TEST(MemorySize1) {
+ TestingModule module(execution_mode);
+ WasmRunner<int32_t> r(&module);
+ module.AddMemory(WasmModule::kPageSize * 1);
+ BUILD(r, kExprMemorySize);
+ CHECK_EQ(1, r.Call());
+}
+
+WASM_EXEC_TEST(MemorySize2) {
+ TestingModule module(execution_mode);
+ WasmRunner<int32_t> r(&module);
+ module.AddMemory(WasmModule::kPageSize * 3);
+ BUILD(r, kExprMemorySize);
+ CHECK_EQ(3, r.Call());
}
WASM_EXEC_TEST(Int32Param0) {
« no previous file with comments | « src/runtime/runtime-wasm.cc ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698