Index: test/cctest/wasm/test-run-wasm-interpreter.cc |
diff --git a/test/cctest/wasm/test-run-wasm-interpreter.cc b/test/cctest/wasm/test-run-wasm-interpreter.cc |
index 514c08a0998e2e9b625e1830e986236f706891ca..71744ae69d87044a49c3487af92011f01b88c576 100644 |
--- a/test/cctest/wasm/test-run-wasm-interpreter.cc |
+++ b/test/cctest/wasm/test-run-wasm-interpreter.cc |
@@ -297,10 +297,20 @@ TEST(Breakpoint_I32And_disable) { |
} |
TEST(GrowMemory) { |
- WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); |
- r.module().AddMemory(WasmModule::kPageSize); |
- BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); |
- CHECK_EQ(1, r.Call(1)); |
+ { |
+ WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); |
+ r.module().AddMemory(WasmModule::kPageSize); |
+ r.module().SetMaxMemPages(10); |
+ BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); |
+ CHECK_EQ(1, r.Call(1)); |
+ } |
+ { |
+ WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); |
+ r.module().AddMemory(WasmModule::kPageSize); |
+ r.module().SetMaxMemPages(10); |
+ BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); |
+ CHECK_EQ(-1, r.Call(11)); |
+ } |
} |
TEST(GrowMemoryPreservesData) { |