Index: test/unittests/wasm/module-decoder-unittest.cc |
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc |
index 398ee15e4146924b11c3bd799f39a962cf8a02ee..2c5763a99e7cd4fd5c4f6aa0da187062a48b17fb 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -126,13 +126,13 @@ static size_t SizeOfVarInt(size_t value) { |
return size; |
} |
-struct LocalTypePair { |
+struct ValueTypePair { |
uint8_t code; |
- LocalType type; |
-} kLocalTypes[] = {{kLocalI32, kAstI32}, |
- {kLocalI64, kAstI64}, |
- {kLocalF32, kAstF32}, |
- {kLocalF64, kAstF64}}; |
+ ValueType type; |
+} kValueTypes[] = {{kLocalI32, kWasmI32}, |
+ {kLocalI64, kWasmI64}, |
+ {kLocalF32, kWasmF32}, |
+ {kLocalF64, kWasmF64}}; |
class WasmModuleVerifyTest : public TestWithIsolateAndZone { |
public: |
@@ -199,7 +199,7 @@ TEST_F(WasmModuleVerifyTest, OneGlobal) { |
const WasmGlobal* global = &result.val->globals.back(); |
- EXPECT_EQ(kAstI32, global->type); |
+ EXPECT_EQ(kWasmI32, global->type); |
EXPECT_EQ(0u, global->offset); |
EXPECT_FALSE(global->mutability); |
EXPECT_EQ(WasmInitExpr::kI32Const, global->init.kind); |
@@ -360,14 +360,14 @@ TEST_F(WasmModuleVerifyTest, TwoGlobals) { |
const WasmGlobal* g0 = &result.val->globals[0]; |
- EXPECT_EQ(kAstF32, g0->type); |
+ EXPECT_EQ(kWasmF32, g0->type); |
EXPECT_EQ(0u, g0->offset); |
EXPECT_FALSE(g0->mutability); |
EXPECT_EQ(WasmInitExpr::kF32Const, g0->init.kind); |
const WasmGlobal* g1 = &result.val->globals[1]; |
- EXPECT_EQ(kAstF64, g1->type); |
+ EXPECT_EQ(kWasmF64, g1->type); |
EXPECT_EQ(8u, g1->offset); |
EXPECT_TRUE(g1->mutability); |
EXPECT_EQ(WasmInitExpr::kF64Const, g1->init.kind); |
@@ -784,8 +784,8 @@ TEST_F(WasmSignatureDecodeTest, Ok_v_v) { |
} |
TEST_F(WasmSignatureDecodeTest, Ok_t_v) { |
- for (size_t i = 0; i < arraysize(kLocalTypes); i++) { |
- LocalTypePair ret_type = kLocalTypes[i]; |
+ for (size_t i = 0; i < arraysize(kValueTypes); i++) { |
+ ValueTypePair ret_type = kValueTypes[i]; |
const byte data[] = {SIG_ENTRY_x(ret_type.code)}; |
FunctionSig* sig = |
DecodeWasmSignatureForTesting(zone(), data, data + sizeof(data)); |
@@ -798,8 +798,8 @@ TEST_F(WasmSignatureDecodeTest, Ok_t_v) { |
} |
TEST_F(WasmSignatureDecodeTest, Ok_v_t) { |
- for (size_t i = 0; i < arraysize(kLocalTypes); i++) { |
- LocalTypePair param_type = kLocalTypes[i]; |
+ for (size_t i = 0; i < arraysize(kValueTypes); i++) { |
+ ValueTypePair param_type = kValueTypes[i]; |
const byte data[] = {SIG_ENTRY_v_x(param_type.code)}; |
FunctionSig* sig = |
DecodeWasmSignatureForTesting(zone(), data, data + sizeof(data)); |
@@ -812,10 +812,10 @@ TEST_F(WasmSignatureDecodeTest, Ok_v_t) { |
} |
TEST_F(WasmSignatureDecodeTest, Ok_t_t) { |
- for (size_t i = 0; i < arraysize(kLocalTypes); i++) { |
- LocalTypePair ret_type = kLocalTypes[i]; |
- for (size_t j = 0; j < arraysize(kLocalTypes); j++) { |
- LocalTypePair param_type = kLocalTypes[j]; |
+ for (size_t i = 0; i < arraysize(kValueTypes); i++) { |
+ ValueTypePair ret_type = kValueTypes[i]; |
+ for (size_t j = 0; j < arraysize(kValueTypes); j++) { |
+ ValueTypePair param_type = kValueTypes[j]; |
const byte data[] = {SIG_ENTRY_x_x(ret_type.code, param_type.code)}; |
FunctionSig* sig = |
DecodeWasmSignatureForTesting(zone(), data, data + sizeof(data)); |
@@ -830,10 +830,10 @@ TEST_F(WasmSignatureDecodeTest, Ok_t_t) { |
} |
TEST_F(WasmSignatureDecodeTest, Ok_i_tt) { |
- for (size_t i = 0; i < arraysize(kLocalTypes); i++) { |
- LocalTypePair p0_type = kLocalTypes[i]; |
- for (size_t j = 0; j < arraysize(kLocalTypes); j++) { |
- LocalTypePair p1_type = kLocalTypes[j]; |
+ for (size_t i = 0; i < arraysize(kValueTypes); i++) { |
+ ValueTypePair p0_type = kValueTypes[i]; |
+ for (size_t j = 0; j < arraysize(kValueTypes); j++) { |
+ ValueTypePair p1_type = kValueTypes[j]; |
const byte data[] = { |
SIG_ENTRY_x_xx(kLocalI32, p0_type.code, p1_type.code)}; |
FunctionSig* sig = |
@@ -1054,7 +1054,7 @@ TEST_F(WasmModuleVerifyTest, UnknownSectionSkipped) { |
const WasmGlobal* global = &result.val->globals.back(); |
- EXPECT_EQ(kAstI32, global->type); |
+ EXPECT_EQ(kWasmI32, global->type); |
EXPECT_EQ(0u, global->offset); |
if (result.val) delete result.val; |