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

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

Issue 2230063002: [wasm] Experimental: Add support for multiple non-homogeneous tables Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/cctest/wasm/wasm-run-utils.h ('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 0a9ce865edba94e653b8020227ce25a7f0495d0a..433a0f47e2f257f2e68960c7f2799a291b7816ee 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -1258,10 +1258,11 @@ TEST_F(AstDecoderTest, SimpleIndirectCalls) {
byte f1 = module_env.AddSignature(sigs.i_i());
byte f2 = module_env.AddSignature(sigs.i_ii());
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_ZERO));
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(22)));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(f0, 0, WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sig,
+ WASM_CALL_INDIRECT1(f1, 0, WASM_ZERO, WASM_I8(22)));
EXPECT_VERIFIES_INLINE(
- sig, WASM_CALL_INDIRECT2(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
+ sig, WASM_CALL_INDIRECT2(f2, 0, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
}
TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) {
@@ -1269,15 +1270,16 @@ TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) {
TestModuleEnv module_env;
module = &module_env;
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(0, 0, WASM_ZERO));
module_env.AddSignature(sigs.i_v());
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
+ EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT0(0, 0, WASM_ZERO));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(22)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(1, 0, WASM_ZERO, WASM_I8(22)));
module_env.AddSignature(sigs.i_i());
- EXPECT_VERIFIES_INLINE(sig, WASM_CALL_INDIRECT1(1, WASM_ZERO, WASM_I8(27)));
+ EXPECT_VERIFIES_INLINE(sig,
+ WASM_CALL_INDIRECT1(1, 0, WASM_ZERO, WASM_I8(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(2, WASM_ZERO, WASM_I8(27)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(2, 0, WASM_ZERO, WASM_I8(27)));
}
TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) {
@@ -1287,23 +1289,25 @@ TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) {
byte f0 = module_env.AddFunction(sigs.i_f());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_I8(17)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_I64V_1(27)));
+ WASM_CALL_INDIRECT1(f0, 0, WASM_ZERO, WASM_I8(17)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT1(f0, WASM_ZERO, WASM_F64(37.2)));
+ WASM_CALL_INDIRECT1(f0, 0, WASM_ZERO, WASM_I64V_1(27)));
+ EXPECT_FAILURE_INLINE(sig,
+ WASM_CALL_INDIRECT1(f0, 0, WASM_ZERO, WASM_F64(37.2)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I8(17)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_I64V_1(27)));
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, WASM_F64(37.2)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, 0, WASM_I8(17)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, 0, WASM_I64V_1(27)));
+ EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT0(f0, 0, WASM_F64(37.2)));
byte f1 = module_env.AddFunction(sigs.i_d());
- EXPECT_FAILURE_INLINE(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(16)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I64V_1(16)));
+ WASM_CALL_INDIRECT1(f1, 0, WASM_ZERO, WASM_I8(16)));
+ EXPECT_FAILURE_INLINE(sig,
+ WASM_CALL_INDIRECT1(f1, 0, WASM_ZERO, WASM_I64V_1(16)));
EXPECT_FAILURE_INLINE(sig,
- WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_F32(17.6)));
+ WASM_CALL_INDIRECT1(f1, 0, WASM_ZERO, WASM_F32(17.6)));
}
TEST_F(AstDecoderTest, SimpleImportCalls) {
« no previous file with comments | « test/cctest/wasm/wasm-run-utils.h ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698