Skip to content

Commit cad80dc

Browse files
authored
Merge pull request #46 from takikawa/adjust-memory-max
Adjust unlinkable test in memory_max tests
2 parents edb9c5b + f40a060 commit cad80dc

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

test/core/custom-page-sizes/memory_max.wast

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
;;
33
;; These modules are valid, but instantiating them is unnecessary
44
;; and would only allocate very large memories and slow down running
5-
;; the spec tests. Therefore, add a missing import so that it cannot
5+
;; the spec tests. Therefore, add an invalid import so that it cannot
66
;; be instantiated and use `assert_unlinkable`. This approach
77
;; enforces that the module itself is still valid, but that its
88
;; instantiation fails early (hopefully before any memories are
99
;; actually allocated).
1010

11+
;; Helper module that exports a non-matching value.
12+
(module
13+
(memory (export "unknown") 0))
14+
15+
(register "test")
16+
1117
;; i32 (pagesize 1)
1218
(assert_unlinkable
1319
(module

test/core/custom-page-sizes/memory_max_i64.wast

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
;;
33
;; These modules are valid, but instantiating them is unnecessary
44
;; and would only allocate very large memories and slow down running
5-
;; the spec tests. Therefore, add a missing import so that it cannot
5+
;; the spec tests. Therefore, add an invalid import so that it cannot
66
;; be instantiated and use `assert_unlinkable`. This approach
77
;; enforces that the module itself is still valid, but that its
88
;; instantiation fails early (hopefully before any memories are
99
;; actually allocated).
1010

11+
;; Helper module that exports a non-matching value.
12+
(module
13+
(memory (export "unknown") 0))
14+
15+
(register "test")
16+
1117
;; i64 (pagesize 1)
1218
(assert_unlinkable
1319
(module

0 commit comments

Comments
 (0)