summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/passes/log-execution_arg.wast24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lit/passes/log-execution_arg.wast b/test/lit/passes/log-execution_arg.wast
new file mode 100644
index 000000000..e987655d6
--- /dev/null
+++ b/test/lit/passes/log-execution_arg.wast
@@ -0,0 +1,24 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+;; Test the option to provide the module name as an argument.
+;; RUN: foreach %s %t wasm-opt --log-execution=foo -S -o - | filecheck %s
+
+(module
+ ;; CHECK: (type $0 (func))
+
+ ;; CHECK: (type $1 (func (param i32)))
+
+ ;; CHECK: (import "env" "func" (func $import))
+ (import "env" "func" (func $import))
+ ;; CHECK: (import "foo" "log_execution" (func $log_execution (param i32)))
+
+ ;; CHECK: (func $nopp
+ ;; CHECK-NEXT: (call $log_execution
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
+ (func $nopp
+ (nop)
+ )
+)
+