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

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

Issue 1780483002: [wasm] Support a two-level namespace for imports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mjsunit/wasm/wasm-module-builder.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/module-decoder-unittest.cc
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc
index c32e873ef8dde2d8e4d78148165445727df0bd8e..d7dbbd7dbeaf7d069996ab080fa76c66a16429b0 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -388,7 +388,6 @@ TEST_F(WasmModuleVerifyTest, OneFunctionImported) {
if (result.val) delete result.val;
}
-
TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody) {
static const byte kCodeStartOffset = 19;
static const byte kCodeEndOffset = kCodeStartOffset + 1;
@@ -1095,6 +1094,20 @@ TEST_F(WasmModuleVerifyTest, ImportTable_one_sig) {
EXPECT_VERIFIES(data);
}
+TEST_F(WasmModuleVerifyTest, ImportTable_invalid_module) {
+ static const byte data[] = {
+ kDeclSignatures,
+ 1,
+ VOID_VOID_SIG,
+ kDeclImportTable,
+ 1, // --
+ SIG_INDEX(0), // sig index
+ NAME_OFFSET(0), // module name
+ NAME_OFFSET(1) // function name
+ };
+ EXPECT_FAILURE(data);
+}
+
TEST_F(WasmModuleVerifyTest, ImportTable_off_end) {
static const byte data[] = {
kDeclSignatures, 1, VOID_VOID_SIG, kDeclImportTable, 1,
« no previous file with comments | « test/mjsunit/wasm/wasm-module-builder.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698