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

Unified Diff: test/cctest/wasm/test-run-wasm.cc

Issue 2799753003: [wasm] Fix typing of loop labels in br_table (Closed)
Patch Set: Created 3 years, 8 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 | « src/wasm/function-body-decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index ae63a56cc4cc5a1c86505c23bcf41f46355a1543..a1eb0511baa6c8dce31d91ae75963b9971a44334 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -1018,6 +1018,20 @@ WASM_EXEC_TEST(BrTable4_fallthru) {
CHECK_EQ(108, r.Call(4, 100));
}
+WASM_EXEC_TEST(BrTable_loop_target) {
+ byte code[] = {
+ WASM_LOOP_I(
+ WASM_BLOCK(
+ WASM_BR_TABLE(WASM_GET_LOCAL(0), 2,
+ BR_TARGET(0), BR_TARGET(1), BR_TARGET(1))),
+ WASM_ONE)};
+
+ WasmRunner<int32_t, int32_t> r(execution_mode);
+ r.Build(code, code + arraysize(code));
+
+ CHECK_EQ(1, r.Call(0));
+}
+
WASM_EXEC_TEST(F32ReinterpretI32) {
WasmRunner<int32_t> r(execution_mode);
int32_t* memory = r.module().AddMemoryElems<int32_t>(8);
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698