Skip to content

Commit eea475e

Browse files
committed
[test] Move memory/table index encoding tests to binary.wast
1 parent 08aa4ad commit eea475e

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

test/core/binary-leb128.wast

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
"\01\82\00" ;; minimum 2
2222
"\82\80\80\80\00" ;; max 2
2323
)
24+
(module binary
25+
"\00asm" "\01\00\00\00"
26+
"\05\03\01" ;; Memory section with 1 entry
27+
"\00\00" ;; no max, minimum 0
28+
"\0b\06\01" ;; Data section with 1 entry
29+
"\00" ;; Memory index 0
30+
"\41\00\0b\00" ;; (i32.const 0) with contents ""
31+
)
2432
(module binary
2533
"\00asm" "\01\00\00\00"
2634
"\05\03\01" ;; Memory section with 1 entry
@@ -29,6 +37,14 @@
2937
"\80\00" ;; Memory index 0, encoded with 2 bytes
3038
"\41\00\0b\00" ;; (i32.const 0) with contents ""
3139
)
40+
(module binary
41+
"\00asm" "\01\00\00\00"
42+
"\04\04\01" ;; Table section with 1 entry
43+
"\70\00\00" ;; no max, minimum 0, funcref
44+
"\09\06\01" ;; Element section with 1 entry
45+
"\00" ;; Table index 0
46+
"\41\00\0b\00" ;; (i32.const 0) with no elements
47+
)
3248
(module binary
3349
"\00asm" "\01\00\00\00"
3450
"\04\04\01" ;; Table section with 1 entry

test/core/binary.wast

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,6 @@
5151
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\81\00\01\00") "malformed section id")
5252
(assert_malformed (module binary "\00asm" "\01\00\00\00" "\ff\00\01\00") "malformed section id")
5353

54-
(module binary
55-
"\00asm" "\01\00\00\00"
56-
"\05\03\01" ;; Memory section with 1 entry
57-
"\00\00" ;; no max, minimum 0
58-
"\0b\06\01" ;; Data section with 1 entry
59-
"\00" ;; Memory index 0
60-
"\41\00\0b\00" ;; (i32.const 0) with contents ""
61-
)
62-
63-
(module binary
64-
"\00asm" "\01\00\00\00"
65-
"\04\04\01" ;; Table section with 1 entry
66-
"\70\00\00" ;; no max, minimum 0, funcref
67-
"\09\06\01" ;; Element section with 1 entry
68-
"\00" ;; Table index 0
69-
"\41\00\0b\00" ;; (i32.const 0) with no elements
70-
)
71-
7254
;; Data segment tags and memory index can have non-minimal length
7355
(module binary
7456
"\00asm" "\01\00\00\00"

0 commit comments

Comments
 (0)