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

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

Issue 2404253002: [wasm] Provide better stack traces for asm.js code (Closed)
Patch Set: Address titzer's comments 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
« no previous file with comments | « test/mjsunit/wasm/asm-wasm-stack.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 42798ca81b1f55aa71a20ee682e8a184a9cc773a..72ae3816155eb1d85f2d3ff074183201dae60d1d 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -47,8 +47,7 @@ namespace wasm {
#define EMPTY_SIGNATURES_SECTION SECTION(Type, 1), 0
#define EMPTY_FUNCTION_SIGNATURES_SECTION SECTION(Function, 1), 0
#define EMPTY_FUNCTION_BODIES_SECTION SECTION(Code, 1), 0
-#define SECTION_NAMES(size) \
- kUnknownSectionCode, U32V_1(size + 5), 4, 'n', 'a', 'm', 'e'
+#define SECTION_NAMES(size) SECTION(Unknown, size + 5), 4, 'n', 'a', 'm', 'e'
#define EMPTY_NAMES_SECTION SECTION_NAMES(1), 0
#define X1(...) __VA_ARGS__
@@ -1288,6 +1287,15 @@ TEST_F(WasmModuleVerifyTest, InitExpr_global) {
EXPECT_EQ(37, expr.val.global_index);
}
+TEST_F(WasmModuleVerifyTest, Multiple_Named_Sections) {
+ static const byte data[] = {
+ SECTION(Unknown, 4), 1, 'X', 17, 18, // --
+ SECTION(Unknown, 9), 3, 'f', 'o', 'o', 5, 6, 7, 8, 9, // --
+ SECTION(Unknown, 8), 5, 'o', 't', 'h', 'e', 'r', 7, 8, // --
+ };
+ EXPECT_VERIFIES(data);
+}
+
} // namespace wasm
} // namespace internal
} // namespace v8
« no previous file with comments | « test/mjsunit/wasm/asm-wasm-stack.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698