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) { |