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 542c3c9d428bec2d4125501b51a5f3f6d69e262f..8c0f234f4432263e2d23b3adffbf5fa5b2ca13cc 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -475,6 +475,23 @@ TEST_F(WasmModuleVerifyTest, TwoDataSegments) { |
EXPECT_OFF_END_FAILURE(data, 14, sizeof(data)); |
} |
+TEST_F(WasmModuleVerifyTest, MaxMaximumMemorySize) { |
+ { |
+ const byte data[] = { |
+ SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0, |
+ U32V_3(65536), |
+ }; |
+ EXPECT_VERIFIES(data); |
+ } |
+ { |
+ const byte data[] = { |
+ SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0, |
+ U32V_3(65537), |
+ }; |
+ EXPECT_FAILURE(data); |
+ } |
+} |
+ |
TEST_F(WasmModuleVerifyTest, DataSegment_wrong_init_type) { |
const byte data[] = { |
SECTION(Memory, 4), |