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

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

Issue 1783593002: [wasm] Encode function signatures, bodies, and names as separate sections. (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
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 988caafcaf54b7639045c5cb9c1c7a009b36b837..5f8e1cb8417b43853204d8f9069ece795bd2828e 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -1059,12 +1059,20 @@ TEST_F(WasmModuleVerifyTest, ImportTable_off_end) {
EXPECT_OFF_END_FAILURE(data, 5, sizeof(data));
}
-TEST_F(WasmModuleVerifyTest, ExportTable_empty) {
- static const byte data[] = {kDeclSignatures, 0, kDeclFunctions, 0,
+TEST_F(WasmModuleVerifyTest, ExportTable_empty1) {
+ static const byte data[] = {kDeclSignatures, 1, VOID_VOID_SIG,
+ kDeclFunctions, 1, EMPTY_FUNCTION(0),
kDeclExportTable, 0};
EXPECT_VERIFIES(data);
}
+TEST_F(WasmModuleVerifyTest, ExportTable_empty2) {
+ static const byte data[] = {kDeclSignatures, 0, kDeclFunctions, 0,
+ kDeclExportTable, 0};
+ // TODO(titzer): current behavior treats empty functions section as missing.
binji 2016/03/09 22:20:17 OK, so I should emit an empty function section whe
+ EXPECT_FAILURE(data);
+}
+
TEST_F(WasmModuleVerifyTest, ExportTable_NoFunctions1) {
static const byte data[] = {kDeclSignatures, 0, kDeclExportTable, 0};
EXPECT_FAILURE(data);
« test/mjsunit/wasm/test-wasm-module-builder.js ('K') | « 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