Skip to content

Commit 5e81f6a

Browse files
authored
Update testsuite submodule (#2549)
This PR vendors the old "memory64" tests into "test/old-spec" and runs them from there, then updates the testsuite submodule. We skip the new "wasm-3.0" tests (which rely on function-references and gc).
1 parent 294fb79 commit 5e81f6a

File tree

95 files changed

+29987
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+29987
-85
lines changed

test/old-spec/proposals/memory64/address.wast

Lines changed: 610 additions & 0 deletions
Large diffs are not rendered by default.

test/old-spec/proposals/memory64/address64.wast

Lines changed: 582 additions & 0 deletions
Large diffs are not rendered by default.

test/old-spec/proposals/memory64/align64.wast

Lines changed: 866 additions & 0 deletions
Large diffs are not rendered by default.

test/old-spec/proposals/memory64/binary-leb128.wast

Lines changed: 1111 additions & 0 deletions
Large diffs are not rendered by default.

test/old-spec/proposals/memory64/binary.wast

Lines changed: 1210 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
;; Unsigned LEB128 can have non-minimal length
2+
(module binary
3+
"\00asm" "\01\00\00\00"
4+
"\05\07\02" ;; Memory section with 2 entries
5+
"\00\82\00" ;; no max, minimum 2
6+
"\00\82\00" ;; no max, minimum 2
7+
)
8+
(module binary
9+
"\00asm" "\01\00\00\00"
10+
"\05\13\03" ;; Memory section with 3 entries
11+
"\00\83\80\80\80\00" ;; no max, minimum 3
12+
"\00\84\80\80\80\00" ;; no max, minimum 4
13+
"\00\85\80\80\80\00" ;; no max, minimum 5
14+
)
15+
16+
(module binary
17+
"\00asm" "\01\00\00\00"
18+
"\05\05\02" ;; Memory section with 2 entries
19+
"\00\00" ;; no max, minimum 0
20+
"\00\00" ;; no max, minimum 0
21+
"\0b\06\01" ;; Data section with 1 entry
22+
"\00" ;; Memory index 0
23+
"\41\00\0b\00" ;; (i32.const 0) with contents ""
24+
)
25+
26+
(module binary
27+
"\00asm" "\01\00\00\00"
28+
"\05\05\02" ;; Memory section with 2 entries
29+
"\00\00" ;; no max, minimum 0
30+
"\00\01" ;; no max, minimum 1
31+
"\0b\07\01" ;; Data section with 1 entry
32+
"\02\01" ;; Memory index 1
33+
"\41\00\0b\00" ;; (i32.const 0) with contents ""
34+
)
35+
36+
(module binary
37+
"\00asm" "\01\00\00\00"
38+
"\05\05\02" ;; Memory section with 2 entries
39+
"\00\00" ;; no max, minimum 0
40+
"\00\01" ;; no max, minimum 1
41+
"\0b\0a\01" ;; Data section with 1 entry
42+
"\02\81\80\80\00" ;; Memory index 1
43+
"\41\00\0b\00" ;; (i32.const 0) with contents ""
44+
)
45+
46+
;; Unsigned LEB128 must not be overlong
47+
(assert_malformed
48+
(module binary
49+
"\00asm" "\01\00\00\00"
50+
"\05\10\02" ;; Memory section with 2 entries
51+
"\00\01" ;; no max, minimum 1
52+
"\00\82\80\80\80\80\80\80\80\80\80\80\00" ;; no max, minimum 2 with one byte too many
53+
)
54+
"integer representation too long"
55+
)
56+
57+
;; 2 memories declared, 1 given
58+
(assert_malformed
59+
(module binary
60+
"\00asm" "\01\00\00\00"
61+
"\05\03\02" ;; memory section with inconsistent count (1 declared, 0 given)
62+
"\00\00" ;; memory 0 (missed)
63+
;; "\00\00" ;; memory 1 (missing)
64+
)
65+
"unexpected end of section or function"
66+
)
67+

0 commit comments

Comments
 (0)