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

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: 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
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 8606d4c6b46328e7c1c66cc8de92957300360ec0..2e9fab8b7f748666182cdb893fc2735ec3c27a46 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) {

Powered by Google App Engine
This is Rietveld 408576698