summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoni L <EnderMoneyMod@gmail.com>2023-11-30 02:06:14 -0300
committerGitHub <noreply@github.com>2023-11-29 21:06:14 -0800
commit2428315bab6d71b4ec794f5519374f2448cabb44 (patch)
treeff8d0dbc5a7489edd81db748cc08adaf86c3ae62
parentbcd03e8a61288a1ca4e1c64701a552fb64e9c391 (diff)
downloadwabt-2428315bab6d71b4ec794f5519374f2448cabb44.tar.gz
wabt-2428315bab6d71b4ec794f5519374f2448cabb44.tar.bz2
wabt-2428315bab6d71b4ec794f5519374f2448cabb44.zip
wasm2c: Test STDIN_FILE error output line numbers (#2341)
-rw-r--r--test/harness/wasm2c/stdin_file.txt9
-rw-r--r--test/harness/wasm2c/stdin_file.wast5
2 files changed, 14 insertions, 0 deletions
diff --git a/test/harness/wasm2c/stdin_file.txt b/test/harness/wasm2c/stdin_file.txt
new file mode 100644
index 00000000..8fc3d0f3
--- /dev/null
+++ b/test/harness/wasm2c/stdin_file.txt
@@ -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 ;;)
diff --git a/test/harness/wasm2c/stdin_file.wast b/test/harness/wasm2c/stdin_file.wast
new file mode 100644
index 00000000..b585e3d5
--- /dev/null
+++ b/test/harness/wasm2c/stdin_file.wast
@@ -0,0 +1,5 @@
+(module
+ (func (export "x") (param $x i32) (result i32) (unreachable))
+)
+(assert_return (invoke "x" (i32.const 1))
+ (i32.const 1))