diff options
Diffstat (limited to 'test/lit/exec/fuzzing-api.wast')
-rw-r--r-- | test/lit/exec/fuzzing-api.wast | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/lit/exec/fuzzing-api.wast b/test/lit/exec/fuzzing-api.wast new file mode 100644 index 000000000..d37d7ef4a --- /dev/null +++ b/test/lit/exec/fuzzing-api.wast @@ -0,0 +1,39 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. + +;; RUN: wasm-opt %s -all --fuzz-exec -o /dev/null 2>&1 | filecheck %s + +;; Test the fuzzing-support module imports. + +(module + (import "fuzzing-support" "log-i32" (func $log-i32 (param i32))) + (import "fuzzing-support" "log-f64" (func $log-f64 (param f64))) + + (import "fuzzing-support" "throw" (func $throw)) + + ;; CHECK: [fuzz-exec] calling logging + ;; CHECK-NEXT: [LoggingExternalInterface logging 42] + ;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159] + (func $logging (export "logging") + (call $log-i32 + (i32.const 42) + ) + (call $log-f64 + (f64.const 3.14159) + ) + ) + + ;; CHECK: [fuzz-exec] calling throwing + ;; CHECK-NEXT: [exception thrown: __private ()] + ;; CHECK-NEXT: warning: no passes specified, not doing any work + (func $throwing (export "throwing") + (call $throw) + ) +) +;; CHECK: [fuzz-exec] calling logging +;; CHECK-NEXT: [LoggingExternalInterface logging 42] +;; CHECK-NEXT: [LoggingExternalInterface logging 3.14159] + +;; CHECK: [fuzz-exec] calling throwing +;; CHECK-NEXT: [exception thrown: __private ()] +;; CHECK-NEXT: [fuzz-exec] comparing logging +;; CHECK-NEXT: [fuzz-exec] comparing throwing |