diff --git a/test/core/custom-page-sizes/memory_max.wast b/test/core/custom-page-sizes/memory_max.wast index dfc89b669..7f3b497d6 100644 --- a/test/core/custom-page-sizes/memory_max.wast +++ b/test/core/custom-page-sizes/memory_max.wast @@ -2,12 +2,18 @@ ;; ;; These modules are valid, but instantiating them is unnecessary ;; and would only allocate very large memories and slow down running -;; the spec tests. Therefore, add a missing import so that it cannot +;; the spec tests. Therefore, add an invalid import so that it cannot ;; be instantiated and use `assert_unlinkable`. This approach ;; enforces that the module itself is still valid, but that its ;; instantiation fails early (hopefully before any memories are ;; actually allocated). +;; Helper module that exports a non-matching value. +(module + (memory (export "unknown") 0)) + +(register "test") + ;; i32 (pagesize 1) (assert_unlinkable (module diff --git a/test/core/custom-page-sizes/memory_max_i64.wast b/test/core/custom-page-sizes/memory_max_i64.wast index 607642dec..81e9aaf5c 100644 --- a/test/core/custom-page-sizes/memory_max_i64.wast +++ b/test/core/custom-page-sizes/memory_max_i64.wast @@ -2,12 +2,18 @@ ;; ;; These modules are valid, but instantiating them is unnecessary ;; and would only allocate very large memories and slow down running -;; the spec tests. Therefore, add a missing import so that it cannot +;; the spec tests. Therefore, add an invalid import so that it cannot ;; be instantiated and use `assert_unlinkable`. This approach ;; enforces that the module itself is still valid, but that its ;; instantiation fails early (hopefully before any memories are ;; actually allocated). +;; Helper module that exports a non-matching value. +(module + (memory (export "unknown") 0)) + +(register "test") + ;; i64 (pagesize 1) (assert_unlinkable (module