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

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

Issue 2481173003: Version 5.6.231.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 1 month 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/trap-location.js ('k') | no next file » | 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 f73264168b3b8ab2dd6e121d4608245b17b44500..070767e7188a71fc9baeb9cbb813467e02738830 100644
--- a/test/unittests/wasm/ast-decoder-unittest.cc
+++ b/test/unittests/wasm/ast-decoder-unittest.cc
@@ -1311,11 +1311,6 @@ class TestModuleEnv : public ModuleEnv {
return result;
}
- void InitializeFunctionTable() {
- mod.function_tables.push_back(
- {0, 0, true, std::vector<int32_t>(), false, false, SignatureMap()});
- }
-
private:
WasmModule mod;
};
@@ -1426,7 +1421,6 @@ TEST_F(AstDecoderTest, MultiReturnType) {
TEST_F(AstDecoderTest, SimpleIndirectCalls) {
FunctionSig* sig = sigs.i_i();
TestModuleEnv module_env;
- module_env.InitializeFunctionTable();
module = &module_env;
byte f0 = module_env.AddSignature(sigs.i_v());
@@ -1442,7 +1436,6 @@ TEST_F(AstDecoderTest, SimpleIndirectCalls) {
TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) {
FunctionSig* sig = sigs.i_i();
TestModuleEnv module_env;
- module_env.InitializeFunctionTable();
module = &module_env;
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO));
@@ -1459,7 +1452,6 @@ TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) {
TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) {
FunctionSig* sig = sigs.i_i();
TestModuleEnv module_env;
- module_env.InitializeFunctionTable();
module = &module_env;
byte f0 = module_env.AddFunction(sigs.i_f());
@@ -1479,21 +1471,6 @@ TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) {
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_F32(17.6)));
}
-TEST_F(AstDecoderTest, IndirectCallsWithoutTableCrash) {
- FunctionSig* sig = sigs.i_i();
- TestModuleEnv module_env;
- module = &module_env;
-
- byte f0 = module_env.AddSignature(sigs.i_v());
- byte f1 = module_env.AddSignature(sigs.i_i());
- byte f2 = module_env.AddSignature(sigs.i_ii());
-
- EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT0(f0, WASM_ZERO));
- EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(22)));
- EXPECT_FAILURE_S(
- sig, WASM_CALL_INDIRECT2(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72)));
-}
-
TEST_F(AstDecoderTest, SimpleImportCalls) {
FunctionSig* sig = sigs.i_i();
TestModuleEnv module_env;
« no previous file with comments | « test/mjsunit/wasm/trap-location.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698