Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1256)

Unified Diff: test/unittests/wasm/module-decoder-unittest.cc

Issue 1775873002: [Wasm] Convert many of the fixed-size values to LEB128. (Closed) Base URL: http://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/wasm/encoder-unittest.cc ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d7dbbd7dbeaf7d069996ab080fa76c66a16429b0..0b363f68a3a59ae2081cb5b8abd521ce5e589345 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -681,10 +681,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[] = {
@@ -693,7 +690,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());
@@ -719,14 +716,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));
@@ -1087,7 +1084,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
};
« no previous file with comments | « test/unittests/wasm/encoder-unittest.cc ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698