diff options
author | Thomas Lively <tlively@google.com> | 2024-02-08 15:27:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 15:27:02 -0800 |
commit | f5d8d30171e53c225fc640e6db8aa42973c8804c (patch) | |
tree | 69744aa9a9a79252234a869531ec3954d0dad5b5 /test/lit/merge | |
parent | e7b34702570110e7f5f0b2cd23bd768d900beb2b (diff) | |
download | binaryen-f5d8d30171e53c225fc640e6db8aa42973c8804c.tar.gz binaryen-f5d8d30171e53c225fc640e6db8aa42973c8804c.tar.bz2 binaryen-f5d8d30171e53c225fc640e6db8aa42973c8804c.zip |
Update lit tests to parse with the new parser (#6290)
Get as many of the lit tests as possible to parse with the new parser, mostly by
moving declared module items to be after imports. Also fix a bug in the new
parser's pop validation to allow supertypes of the expected type.
The two big issues that still prevent some lit tests from working correctly
under the new parser are missing support for symbolic field names and missing
support for source map annotations.
Diffstat (limited to 'test/lit/merge')
-rw-r--r-- | test/lit/merge/fusing.wat.second | 7 | ||||
-rw-r--r-- | test/lit/merge/memory_data.wat.second | 6 | ||||
-rw-r--r-- | test/lit/merge/renamings.wat.second | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/test/lit/merge/fusing.wat.second b/test/lit/merge/fusing.wat.second index 7ab9cc3f3..4a3c8d14c 100644 --- a/test/lit/merge/fusing.wat.second +++ b/test/lit/merge/fusing.wat.second @@ -6,6 +6,10 @@ ;; Use a different prefix than in first ($main instead of $other). (import "first" "bar" (func $main.bar)) + (import "first" "mem" (memory $other.mem 1)) + + (import "first" "exn" (tag $exn)) + (memory $second.mem 2) (export "mem" (memory $second.mem)) @@ -26,8 +30,6 @@ ) ) - (import "first" "mem" (memory $other.mem 1)) - (func $keepalive2 (export "keepalive2") (result i32) ;; Load from the memory imported from the second module. (i32.load $other.mem @@ -35,6 +37,5 @@ ) ) - (import "first" "exn" (tag $exn)) (func $keepalive3 (export "keepalive3") (throw $exn)) ) diff --git a/test/lit/merge/memory_data.wat.second b/test/lit/merge/memory_data.wat.second index 8af6ba36d..4a738877d 100644 --- a/test/lit/merge/memory_data.wat.second +++ b/test/lit/merge/memory_data.wat.second @@ -1,11 +1,11 @@ (module + ;; Test that the import remains + (import "import" "mem" (memory $imported 10000)) + (memory $other 100) (memory $bar 1000) - ;; Test that the import remains - (import "import" "mem" (memory $imported 10000)) - (data $a (memory $other) (i32.const 0) "a2") (data $b (memory $bar) (i32.const 0) "b2") diff --git a/test/lit/merge/renamings.wat.second b/test/lit/merge/renamings.wat.second index f3489e620..25d3d5e81 100644 --- a/test/lit/merge/renamings.wat.second +++ b/test/lit/merge/renamings.wat.second @@ -1,13 +1,13 @@ (module (type $array (array (mut (ref null func)))) + ;; Test that the import remains + (import "elsewhere" "some.tag" (tag $imported (param f64))) + (tag $foo (param f32)) (tag $other (param f64)) - ;; Test that the import remains - (import "elsewhere" "some.tag" (tag $imported (param f64))) - (memory $foo 50 60) (memory $other 70 80) |