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

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

Issue 2440953002: [wasm] Binary 0xD: update encoding of opcodes, types, and add immediates. (Closed)
Patch Set: Fix imported table kind. Created 4 years, 2 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/mjsunit/wasm/wasm-constants.js ('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/ast-decoder-unittest.cc
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc
index 14f9c40765a919724f79a09b5a79a567e1b59a29..070767e7188a71fc9baeb9cbb813467e02738830 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -1149,7 +1149,7 @@ TEST_F(AstDecoderTest, AllSimpleExpressions) {
}
TEST_F(AstDecoderTest, MemorySize) {
- byte code[] = {kExprMemorySize};
+ byte code[] = {kExprMemorySize, 0};
EXPECT_VERIFIES_C(i_i, code);
EXPECT_FAILURE_C(f_ff, code);
}
@@ -1632,7 +1632,7 @@ TEST_F(AstDecoderTest, WasmGrowMemory) {
module = &module_env;
module->origin = kWasmOrigin;
- byte code[] = {WASM_UNOP(kExprGrowMemory, WASM_GET_LOCAL(0))};
+ byte code[] = {WASM_GET_LOCAL(0), kExprGrowMemory, 0};
EXPECT_VERIFIES_C(i_i, code);
EXPECT_FAILURE_C(i_d, code);
}
@@ -1642,7 +1642,7 @@ TEST_F(AstDecoderTest, AsmJsGrowMemory) {
module = &module_env;
module->origin = kAsmJsOrigin;
- byte code[] = {WASM_UNOP(kExprGrowMemory, WASM_GET_LOCAL(0))};
+ byte code[] = {WASM_GET_LOCAL(0), kExprGrowMemory, 0};
EXPECT_FAILURE_C(i_i, code);
}
@@ -2316,7 +2316,7 @@ TEST_F(WasmOpcodeLengthTest, MiscExpressions) {
EXPECT_LENGTH(2, kExprGetGlobal);
EXPECT_LENGTH(2, kExprSetGlobal);
EXPECT_LENGTH(2, kExprCallFunction);
- EXPECT_LENGTH(2, kExprCallIndirect);
+ EXPECT_LENGTH(3, kExprCallIndirect);
}
TEST_F(WasmOpcodeLengthTest, I32Const) {
@@ -2375,8 +2375,8 @@ TEST_F(WasmOpcodeLengthTest, LoadsAndStores) {
}
TEST_F(WasmOpcodeLengthTest, MiscMemExpressions) {
- EXPECT_LENGTH(1, kExprMemorySize);
- EXPECT_LENGTH(1, kExprGrowMemory);
+ EXPECT_LENGTH(2, kExprMemorySize);
+ EXPECT_LENGTH(2, kExprGrowMemory);
}
TEST_F(WasmOpcodeLengthTest, SimpleExpressions) {
« no previous file with comments | « test/mjsunit/wasm/wasm-constants.js ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698