| 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 c32e873ef8dde2d8e4d78148165445727df0bd8e..9eaaf16cc30389f2b74e0e37889dbb889d8e5ae7 100644
|
| --- a/test/unittests/wasm/module-decoder-unittest.cc
|
| +++ b/test/unittests/wasm/module-decoder-unittest.cc
|
| @@ -682,10 +682,7 @@ TEST_F(WasmModuleVerifyTest, DataSegmentWithInvalidDest) {
|
|
|
|
|
| // To make below tests for indirect calls much shorter.
|
| -#define FUNCTION(sig_index, external) \
|
| - kDeclFunctionImport, static_cast<byte>(sig_index), \
|
| - static_cast<byte>(sig_index >> 8)
|
| -
|
| +#define FUNCTION(sig_index, external) kDeclFunctionImport, SIG_INDEX(sig_index)
|
|
|
| TEST_F(WasmModuleVerifyTest, OneIndirectFunction) {
|
| static const byte data[] = {
|
| @@ -694,7 +691,7 @@ TEST_F(WasmModuleVerifyTest, OneIndirectFunction) {
|
| // func#0 ------------------------------------------------------
|
| kDeclFunctions, 1, FUNCTION(0, 0),
|
| // indirect table ----------------------------------------------
|
| - kDeclFunctionTable, 1, 0, 0};
|
| + kDeclFunctionTable, 1, U32V_1(0)};
|
|
|
| ModuleResult result = DecodeModule(data, data + arraysize(data));
|
| EXPECT_TRUE(result.ok());
|
| @@ -720,14 +717,14 @@ TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
|
| FUNCTION(1, 1), // --
|
| // indirect table ----------------------------------------------
|
| kDeclFunctionTable, 8,
|
| - U16_LE(0), // --
|
| - U16_LE(1), // --
|
| - U16_LE(2), // --
|
| - U16_LE(3), // --
|
| - U16_LE(0), // --
|
| - U16_LE(1), // --
|
| - U16_LE(2), // --
|
| - U16_LE(3), // --
|
| + U32V_1(0), // --
|
| + U32V_1(1), // --
|
| + U32V_1(2), // --
|
| + U32V_1(3), // --
|
| + U32V_1(0), // --
|
| + U32V_1(1), // --
|
| + U32V_1(2), // --
|
| + U32V_1(3), // --
|
| };
|
|
|
| ModuleResult result = DecodeModule(data, data + arraysize(data));
|
| @@ -1088,7 +1085,7 @@ TEST_F(WasmModuleVerifyTest, ImportTable_one_sig) {
|
| VOID_VOID_SIG,
|
| kDeclImportTable,
|
| 1, // --
|
| - SIG_INDEX(0), // sig index
|
| + U32V_1(0), // sig index
|
| NAME_OFFSET(1), // module name
|
| NAME_OFFSET(1) // function name
|
| };
|
|
|