Skip to content

Commit

Permalink
wasm2c: Test STDIN_FILE error output line numbers (WebAssembly#2341)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 authored Nov 30, 2023
1 parent bcd03e8 commit 2428315
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/harness/wasm2c/stdin_file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;;; TOOL: run-spec-wasm2c
;;; ERROR: 1
;;; STDIN_FILE: test/harness/wasm2c/stdin_file.wast
(;; STDERR ;;;
stdin_file.wast:4: assertion failed: w2c_stdin__file__0__wasm_x(&stdin__file__0__wasm_instance, 1u) trapped (Unreachable instruction executed).
;;; STDERR ;;)
(;; STDOUT ;;;
0/1 tests passed.
;;; STDOUT ;;)
5 changes: 5 additions & 0 deletions test/harness/wasm2c/stdin_file.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(module
(func (export "x") (param $x i32) (result i32) (unreachable))
)
(assert_return (invoke "x" (i32.const 1))
(i32.const 1))

0 comments on commit 2428315

Please sign in to comment.