Index: test/unittests/wasm/function-body-decoder-unittest.cc |
diff --git a/test/unittests/wasm/function-body-decoder-unittest.cc b/test/unittests/wasm/function-body-decoder-unittest.cc |
index 82fdaf986699589205b47fa2dd14f6fda0f6c946..83e4b386c7b2f9310e06ac7a82a8249fffd2662c 100644 |
--- a/test/unittests/wasm/function-body-decoder-unittest.cc |
+++ b/test/unittests/wasm/function-body-decoder-unittest.cc |
@@ -10,8 +10,10 @@ |
#include "src/objects.h" |
+#include "src/wasm/function-body-decoder-impl.h" |
#include "src/wasm/function-body-decoder.h" |
#include "src/wasm/signature-map.h" |
+#include "src/wasm/wasm-limits.h" |
#include "src/wasm/wasm-macro-gen.h" |
#include "src/wasm/wasm-module.h" |
#include "src/wasm/wasm-opcodes.h" |
@@ -372,22 +374,22 @@ TEST_F(FunctionBodyDecoderTest, GetLocal_off_end) { |
} |
TEST_F(FunctionBodyDecoderTest, NumLocalBelowLimit) { |
- AddLocals(kWasmI32, kMaxNumWasmLocals - 1); |
+ AddLocals(kWasmI32, kV8MaxWasmFunctionLocals - 1); |
EXPECT_VERIFIES(v_v, WASM_NOP); |
} |
TEST_F(FunctionBodyDecoderTest, NumLocalAtLimit) { |
- AddLocals(kWasmI32, kMaxNumWasmLocals); |
+ AddLocals(kWasmI32, kV8MaxWasmFunctionLocals); |
EXPECT_VERIFIES(v_v, WASM_NOP); |
} |
TEST_F(FunctionBodyDecoderTest, NumLocalAboveLimit) { |
- AddLocals(kWasmI32, kMaxNumWasmLocals + 1); |
+ AddLocals(kWasmI32, kV8MaxWasmFunctionLocals + 1); |
EXPECT_FAILURE(v_v, WASM_NOP); |
} |
TEST_F(FunctionBodyDecoderTest, GetLocal_varint) { |
- const int kMaxLocals = kMaxNumWasmLocals - 1; |
+ const int kMaxLocals = kV8MaxWasmFunctionLocals - 1; |
AddLocals(kWasmI32, kMaxLocals); |
EXPECT_VERIFIES(i_i, kExprGetLocal, U32V_1(66)); |
@@ -408,7 +410,7 @@ TEST_F(FunctionBodyDecoderTest, GetLocal_varint) { |
} |
TEST_F(FunctionBodyDecoderTest, GetLocal_toomany) { |
- AddLocals(kWasmI32, kMaxNumWasmLocals - 100); |
+ AddLocals(kWasmI32, kV8MaxWasmFunctionLocals - 100); |
AddLocals(kWasmI32, 100); |
EXPECT_VERIFIES(i_v, kExprGetLocal, U32V_1(66)); |