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

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

Issue 1763433002: [wasm] Rework encoding of local declarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 cb61d48baa14d97fa8526017264b7aa92268ba4c..abd865c8cc2bc87b2bd8b2c8273a3e0efd7bc6ba 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -903,10 +903,11 @@ class WasmFunctionVerifyTest : public TestWithZone {};
TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
static const byte data[] = {
0, kLocalVoid, // signature
- 3, 0, // local int32 count
- 4, 0, // local int64 count
- 5, 0, // local float32 count
- 6, 0, // local float64 count
+ 4, // locals
+ 3, kLocalI32, // --
+ 4, kLocalI64, // --
+ 5, kLocalF32, // --
+ 6, kLocalF64, // --
kExprNop // body
};
@@ -919,12 +920,9 @@ TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
EXPECT_EQ(0, function->sig->parameter_count());
EXPECT_EQ(0, function->sig->return_count());
EXPECT_EQ(0, function->name_offset);
- EXPECT_EQ(arraysize(data) - 1, function->code_start_offset);
+ EXPECT_EQ(2, function->code_start_offset);
EXPECT_EQ(arraysize(data), function->code_end_offset);
- EXPECT_EQ(3, function->local_i32_count);
- EXPECT_EQ(4, function->local_i64_count);
- EXPECT_EQ(5, function->local_f32_count);
- EXPECT_EQ(6, function->local_f64_count);
+ // TODO(titzer): verify encoding of local declarations
EXPECT_FALSE(function->external);
EXPECT_FALSE(function->exported);
}

Powered by Google App Engine
This is Rietveld 408576698