diff options
author | Alon Zakai <azakai@google.com> | 2023-07-17 15:53:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 15:53:06 -0700 |
commit | f96fcb0e0c15299045b828447e65754727eeab57 (patch) | |
tree | 0c257cc49394909552db8c25a20520e8185cd281 /test/lit/merge | |
parent | a715c5f344d170c469dddd1c4d7852fa79dc2f06 (diff) | |
download | binaryen-f96fcb0e0c15299045b828447e65754727eeab57.tar.gz binaryen-f96fcb0e0c15299045b828447e65754727eeab57.tar.bz2 binaryen-f96fcb0e0c15299045b828447e65754727eeab57.zip |
wasm-merge: Error on import loops (#5820)
Diffstat (limited to 'test/lit/merge')
-rw-r--r-- | test/lit/merge/import_cycle.wat | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/lit/merge/import_cycle.wat b/test/lit/merge/import_cycle.wat index 0261eabc5..84d6017b9 100644 --- a/test/lit/merge/import_cycle.wat +++ b/test/lit/merge/import_cycle.wat @@ -1,16 +1,10 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. -;; RUN: wasm-merge %s first %s.second second -S -o - | filecheck %s +;; RUN: not wasm-merge %s first %s.second second 2>&1 | filecheck %s -;; Test that wasm-merge terminates when there are importation cycles +;; Test that wasm-merge terminates with an error when there is an import cycle. -(module - ;; CHECK: (type $none_=>_none (func)) +;; CHECK: Fatal: wasm-merge: infinite loop of imports on f - ;; CHECK: (import "second" "g" (func $f)) +(module (import "second" "g" (func $f)) - ;; CHECK: (import "first" "f" (func $f_1)) - - ;; CHECK: (export "f" (func $f_1)) (export "f" (func $f)) ) -;; CHECK: (export "g" (func $f)) |