Skip to content

Commit

Permalink
Add wasm-merge test
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Mar 2, 2024
1 parent c7b2a02 commit 3ebbb6f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/lit/merge/sourcemap.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
;; 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

;; Test that we fuse imports to exports across modules.

(module
(func (export "f")
;;@ a:1:1
(nop)
)
)
;; CHECK: (type $0 (func))

;; CHECK: (export "f" (func $0))

;; CHECK: (export "g" (func $0_1))

;; CHECK: (func $0
;; CHECK-NEXT: ;;@ a:1:1
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )

;; CHECK: (func $0_1
;; CHECK-NEXT: ;;@ b:2:2
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
6 changes: 6 additions & 0 deletions test/lit/merge/sourcemap.wat.second
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(module
(func (export "g")
;;@ b:2:2
(nop)
)
)

0 comments on commit 3ebbb6f

Please sign in to comment.