diff options
Diffstat (limited to 'test/lit/binary/delegate-block.test')
-rw-r--r-- | test/lit/binary/delegate-block.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/lit/binary/delegate-block.test b/test/lit/binary/delegate-block.test new file mode 100644 index 000000000..7da386cb0 --- /dev/null +++ b/test/lit/binary/delegate-block.test @@ -0,0 +1,27 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; Test that we can parse a binary with a delegate that targets a block instead +;; of a try-catch. + +;; Disassembled binary from wabt: +;; +;; (module +;; (type (;0;) (func)) +;; (func (;0;) (type 0) +;; block ;; label = @1 +;; try ;; label = @2 +;; nop +;; delegate 0 +;; end)) + +;; RUN: wasm-opt -all %s.wasm -S -o - | filecheck %s +;; CHECK: (type $0 (func)) + +;; CHECK: (func $0 (type $0) +;; CHECK-NEXT: (try +;; CHECK-NEXT: (do +;; CHECK-NEXT: (nop) +;; CHECK-NEXT: ) +;; CHECK-NEXT: (delegate 0) +;; CHECK-NEXT: ) +;; CHECK-NEXT: ) |