summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parse/assert/nocheck-assertinvalid.txt2
-rw-r--r--test/parse/expr/bad-br-bad-depth.txt16
-rw-r--r--test/parse/expr/bad-br-defined-later.txt12
-rw-r--r--test/parse/expr/bad-br-name-undefined.txt8
-rw-r--r--test/parse/expr/bad-br-name.txt17
-rw-r--r--test/parse/expr/bad-br-no-depth.txt11
-rw-r--r--test/parse/expr/bad-br-undefined.txt8
-rw-r--r--test/parse/expr/bad-brtable-bad-depth.txt12
-rw-r--r--test/parse/expr/bad-compare-one-expr.txt14
-rw-r--r--test/parse/expr/bad-const-f32-trailing.txt14
-rw-r--r--test/parse/expr/bad-const-i32-garbage.txt14
-rw-r--r--test/parse/expr/bad-const-i32-just-negative-sign.txt12
-rw-r--r--test/parse/expr/bad-const-i32-overflow.txt8
-rw-r--r--test/parse/expr/bad-const-i32-trailing.txt14
-rw-r--r--test/parse/expr/bad-const-i32-underflow.txt8
-rw-r--r--test/parse/expr/bad-const-i64-overflow.txt8
-rw-r--r--test/parse/expr/bad-convert-float-sign.txt13
-rw-r--r--test/parse/expr/bad-convert-int-no-sign.txt16
-rw-r--r--test/parse/expr/bad-getglobal-name-undefined.txt8
-rw-r--r--test/parse/expr/bad-getglobal-undefined.txt8
-rw-r--r--test/parse/expr/bad-getlocal-name-undefined.txt8
-rw-r--r--test/parse/expr/bad-getlocal-name.txt12
22 files changed, 128 insertions, 115 deletions
diff --git a/test/parse/assert/nocheck-assertinvalid.txt b/test/parse/assert/nocheck-assertinvalid.txt
index 396667f9..a012a846 100644
--- a/test/parse/assert/nocheck-assertinvalid.txt
+++ b/test/parse/assert/nocheck-assertinvalid.txt
@@ -7,4 +7,4 @@
;; normally would print a message displaying why the module was invalid.
(assert_invalid
(module
- (func (result i32) (i64.const 1))) "bar")
+ (func (result i32) i64.const 1)) "bar")
diff --git a/test/parse/expr/bad-br-bad-depth.txt b/test/parse/expr/bad-br-bad-depth.txt
index 41a1b6bc..15e16c91 100644
--- a/test/parse/expr/bad-br-bad-depth.txt
+++ b/test/parse/expr/bad-br-bad-depth.txt
@@ -1,11 +1,13 @@
;;; ERROR: 1
(module
- (func ;; 2 (implicit)
- (block ;; 1
- (block ;; 0
- (br 3)))))
+ (func ;; 2 (implicit)
+ block ;; 1
+ block ;; 0
+ br 3
+ end
+ end))
(;; STDERR ;;;
-parse/expr/bad-br-bad-depth.txt:6:13: label variable out of range (max 3)
- (br 3)))))
- ^
+parse/expr/bad-br-bad-depth.txt:6:12: label variable out of range (max 3)
+ br 3
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-br-defined-later.txt b/test/parse/expr/bad-br-defined-later.txt
index c1def790..d2e0823d 100644
--- a/test/parse/expr/bad-br-defined-later.txt
+++ b/test/parse/expr/bad-br-defined-later.txt
@@ -1,10 +1,12 @@
;;; ERROR: 1
(module
(func
- (br 1)
- (block (nop))))
+ br 1
+ block
+ nop
+ end))
(;; STDERR ;;;
-parse/expr/bad-br-defined-later.txt:4:9: label variable out of range (max 1)
- (br 1)
- ^
+parse/expr/bad-br-defined-later.txt:4:8: label variable out of range (max 1)
+ br 1
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-br-name-undefined.txt b/test/parse/expr/bad-br-name-undefined.txt
index 3c5618e2..8b414d43 100644
--- a/test/parse/expr/bad-br-name-undefined.txt
+++ b/test/parse/expr/bad-br-name-undefined.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (br $n)))
+(module (func br $n))
(;; STDERR ;;;
-parse/expr/bad-br-name-undefined.txt:2:19: undefined label variable "$n"
-(module (func (br $n)))
- ^^
+parse/expr/bad-br-name-undefined.txt:2:18: undefined label variable "$n"
+(module (func br $n))
+ ^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-br-name.txt b/test/parse/expr/bad-br-name.txt
index 82151b1c..da38f58b 100644
--- a/test/parse/expr/bad-br-name.txt
+++ b/test/parse/expr/bad-br-name.txt
@@ -1,10 +1,13 @@
;;; ERROR: 1
-(module (func (block $foo (br foo))))
+(module (func
+ block $foo
+ br foo
+ end))
(;; STDERR ;;;
-parse/expr/bad-br-name.txt:2:31: unexpected token "foo"
-(module (func (block $foo (br foo))))
- ^^^
-parse/expr/bad-br-name.txt:2:34: syntax error, unexpected ), expecting NAT or VAR
-(module (func (block $foo (br foo))))
- ^
+parse/expr/bad-br-name.txt:4:16: unexpected token "foo"
+ br foo
+ ^^^
+parse/expr/bad-br-name.txt:5:11: syntax error, unexpected END, expecting NAT or VAR
+ end))
+ ^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-br-no-depth.txt b/test/parse/expr/bad-br-no-depth.txt
index 4e455fda..34f948d2 100644
--- a/test/parse/expr/bad-br-no-depth.txt
+++ b/test/parse/expr/bad-br-no-depth.txt
@@ -1,10 +1,11 @@
;;; ERROR: 1
(module
(func
- (block
- (br))))
+ block
+ br
+ end))
(;; STDERR ;;;
-parse/expr/bad-br-no-depth.txt:5:10: syntax error, unexpected ), expecting NAT or VAR
- (br))))
- ^
+parse/expr/bad-br-no-depth.txt:6:5: syntax error, unexpected END, expecting NAT or VAR
+ end))
+ ^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-br-undefined.txt b/test/parse/expr/bad-br-undefined.txt
index a56cabdb..10172f0e 100644
--- a/test/parse/expr/bad-br-undefined.txt
+++ b/test/parse/expr/bad-br-undefined.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (br 1)))
+(module (func br 1))
(;; STDERR ;;;
-parse/expr/bad-br-undefined.txt:2:19: label variable out of range (max 1)
-(module (func (br 1)))
- ^
+parse/expr/bad-br-undefined.txt:2:18: label variable out of range (max 1)
+(module (func br 1))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-brtable-bad-depth.txt b/test/parse/expr/bad-brtable-bad-depth.txt
index ea59bb42..e859b124 100644
--- a/test/parse/expr/bad-brtable-bad-depth.txt
+++ b/test/parse/expr/bad-brtable-bad-depth.txt
@@ -1,10 +1,12 @@
;;; ERROR: 1
(module
(func ;; depth 1 (implicit)
- (block ;; depth 0
- (br_table 2 (i32.const 0)))))
+ block ;; depth 0
+ i32.const 0
+ br_table 2
+ end))
(;; STDERR ;;;
-parse/expr/bad-brtable-bad-depth.txt:5:17: label variable out of range (max 2)
- (br_table 2 (i32.const 0)))))
- ^
+parse/expr/bad-brtable-bad-depth.txt:6:16: label variable out of range (max 2)
+ br_table 2
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-compare-one-expr.txt b/test/parse/expr/bad-compare-one-expr.txt
index 1cd9b798..8964247a 100644
--- a/test/parse/expr/bad-compare-one-expr.txt
+++ b/test/parse/expr/bad-compare-one-expr.txt
@@ -1,10 +1,12 @@
;;; ERROR: 1
-(module (func (i32.lt_s (i32.const 0))))
+(module (func
+ i32.const 0
+ i32.lt_s))
(;; STDERR ;;;
-parse/expr/bad-compare-one-expr.txt:2:16: type stack size too small at i32.lt_s. got 1, expected at least 2
-(module (func (i32.lt_s (i32.const 0))))
- ^^^^^^^^
+parse/expr/bad-compare-one-expr.txt:4:11: type stack size too small at i32.lt_s. got 1, expected at least 2
+ i32.lt_s))
+ ^^^^^^^^
parse/expr/bad-compare-one-expr.txt:2:9: type stack at end of function is 2. expected 0
-(module (func (i32.lt_s (i32.const 0))))
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+(module (func
+ ^^^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-f32-trailing.txt b/test/parse/expr/bad-const-f32-trailing.txt
index 9e1718e9..d048a4b9 100644
--- a/test/parse/expr/bad-const-f32-trailing.txt
+++ b/test/parse/expr/bad-const-f32-trailing.txt
@@ -1,10 +1,10 @@
;;; ERROR: 1
-(module (func (f32.const 1234.5678foo)))
+(module (func f32.const 1234.5678foo))
(;; STDERR ;;;
-parse/expr/bad-const-f32-trailing.txt:2:26: unexpected token "1234.5678foo"
-(module (func (f32.const 1234.5678foo)))
- ^^^^^^^^^^^^
-parse/expr/bad-const-f32-trailing.txt:2:38: syntax error, unexpected ), expecting NAT or INT or FLOAT
-(module (func (f32.const 1234.5678foo)))
- ^
+parse/expr/bad-const-f32-trailing.txt:2:25: unexpected token "1234.5678foo"
+(module (func f32.const 1234.5678foo))
+ ^^^^^^^^^^^^
+parse/expr/bad-const-f32-trailing.txt:2:37: syntax error, unexpected ), expecting NAT or INT or FLOAT
+(module (func f32.const 1234.5678foo))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i32-garbage.txt b/test/parse/expr/bad-const-i32-garbage.txt
index f4d7d8ed..8fb0b7ad 100644
--- a/test/parse/expr/bad-const-i32-garbage.txt
+++ b/test/parse/expr/bad-const-i32-garbage.txt
@@ -1,10 +1,10 @@
;;; ERROR: 1
-(module (func (i32.const one-hundred)))
+(module (func i32.const one-hundred))
(;; STDERR ;;;
-parse/expr/bad-const-i32-garbage.txt:2:26: unexpected token "one-hundred"
-(module (func (i32.const one-hundred)))
- ^^^^^^^^^^^
-parse/expr/bad-const-i32-garbage.txt:2:37: syntax error, unexpected ), expecting NAT or INT or FLOAT
-(module (func (i32.const one-hundred)))
- ^
+parse/expr/bad-const-i32-garbage.txt:2:25: unexpected token "one-hundred"
+(module (func i32.const one-hundred))
+ ^^^^^^^^^^^
+parse/expr/bad-const-i32-garbage.txt:2:36: syntax error, unexpected ), expecting NAT or INT or FLOAT
+(module (func i32.const one-hundred))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i32-just-negative-sign.txt b/test/parse/expr/bad-const-i32-just-negative-sign.txt
index 6b509707..e2574616 100644
--- a/test/parse/expr/bad-const-i32-just-negative-sign.txt
+++ b/test/parse/expr/bad-const-i32-just-negative-sign.txt
@@ -1,11 +1,11 @@
;;; ERROR: 1
(module
- (func (i32.const -)))
+ (func i32.const -))
(;; STDERR ;;;
-parse/expr/bad-const-i32-just-negative-sign.txt:3:20: unexpected token "-"
- (func (i32.const -)))
+parse/expr/bad-const-i32-just-negative-sign.txt:3:19: unexpected token "-"
+ (func i32.const -))
+ ^
+parse/expr/bad-const-i32-just-negative-sign.txt:3:20: syntax error, unexpected ), expecting NAT or INT or FLOAT
+ (func i32.const -))
^
-parse/expr/bad-const-i32-just-negative-sign.txt:3:21: syntax error, unexpected ), expecting NAT or INT or FLOAT
- (func (i32.const -)))
- ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i32-overflow.txt b/test/parse/expr/bad-const-i32-overflow.txt
index f3ae25bb..21bc996b 100644
--- a/test/parse/expr/bad-const-i32-overflow.txt
+++ b/test/parse/expr/bad-const-i32-overflow.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (i32.const 4294967296)))
+(module (func i32.const 4294967296))
(;; STDERR ;;;
-parse/expr/bad-const-i32-overflow.txt:2:26: invalid literal "4294967296"
-(module (func (i32.const 4294967296)))
- ^^^^^^^^^^
+parse/expr/bad-const-i32-overflow.txt:2:25: invalid literal "4294967296"
+(module (func i32.const 4294967296))
+ ^^^^^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i32-trailing.txt b/test/parse/expr/bad-const-i32-trailing.txt
index 0c24503b..ae405ba6 100644
--- a/test/parse/expr/bad-const-i32-trailing.txt
+++ b/test/parse/expr/bad-const-i32-trailing.txt
@@ -1,10 +1,10 @@
;;; ERROR: 1
-(module (func (i32.const 100x)))
+(module (func i32.const 100x))
(;; STDERR ;;;
-parse/expr/bad-const-i32-trailing.txt:2:26: unexpected token "100x"
-(module (func (i32.const 100x)))
- ^^^^
-parse/expr/bad-const-i32-trailing.txt:2:30: syntax error, unexpected ), expecting NAT or INT or FLOAT
-(module (func (i32.const 100x)))
- ^
+parse/expr/bad-const-i32-trailing.txt:2:25: unexpected token "100x"
+(module (func i32.const 100x))
+ ^^^^
+parse/expr/bad-const-i32-trailing.txt:2:29: syntax error, unexpected ), expecting NAT or INT or FLOAT
+(module (func i32.const 100x))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i32-underflow.txt b/test/parse/expr/bad-const-i32-underflow.txt
index a2273c74..43157b4f 100644
--- a/test/parse/expr/bad-const-i32-underflow.txt
+++ b/test/parse/expr/bad-const-i32-underflow.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (i32.const -2147483649)))
+(module (func i32.const -2147483649))
(;; STDERR ;;;
-parse/expr/bad-const-i32-underflow.txt:2:26: invalid literal "-2147483649"
-(module (func (i32.const -2147483649)))
- ^^^^^^^^^^^
+parse/expr/bad-const-i32-underflow.txt:2:25: invalid literal "-2147483649"
+(module (func i32.const -2147483649))
+ ^^^^^^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-const-i64-overflow.txt b/test/parse/expr/bad-const-i64-overflow.txt
index f643575b..89551994 100644
--- a/test/parse/expr/bad-const-i64-overflow.txt
+++ b/test/parse/expr/bad-const-i64-overflow.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (i64.const 18446744073709551616)))
+(module (func i64.const 18446744073709551616))
(;; STDERR ;;;
-parse/expr/bad-const-i64-overflow.txt:2:26: invalid literal "18446744073709551616"
-(module (func (i64.const 18446744073709551616)))
- ^^^^^^^^^^^^^^^^^^^^
+parse/expr/bad-const-i64-overflow.txt:2:25: invalid literal "18446744073709551616"
+(module (func i64.const 18446744073709551616))
+ ^^^^^^^^^^^^^^^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-convert-float-sign.txt b/test/parse/expr/bad-convert-float-sign.txt
index 803061e2..a02578a2 100644
--- a/test/parse/expr/bad-convert-float-sign.txt
+++ b/test/parse/expr/bad-convert-float-sign.txt
@@ -1,10 +1,9 @@
;;; ERROR: 1
-(module (func (f32.converts.f64 (f32.const 0))))
+(module (func
+ f32.const 0
+ f32.converts.f64))
(;; STDERR ;;;
-parse/expr/bad-convert-float-sign.txt:2:16: unexpected token "f32.converts.f64"
-(module (func (f32.converts.f64 (f32.const 0))))
- ^^^^^^^^^^^^^^^^
-parse/expr/bad-convert-float-sign.txt:2:33: syntax error, unexpected (
-(module (func (f32.converts.f64 (f32.const 0))))
- ^
+parse/expr/bad-convert-float-sign.txt:4:11: unexpected token "f32.converts.f64"
+ f32.converts.f64))
+ ^^^^^^^^^^^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-convert-int-no-sign.txt b/test/parse/expr/bad-convert-int-no-sign.txt
index 0bf718de..0a82463a 100644
--- a/test/parse/expr/bad-convert-int-no-sign.txt
+++ b/test/parse/expr/bad-convert-int-no-sign.txt
@@ -1,10 +1,12 @@
;;; ERROR: 1
-(module (func (i32.convert.i32 (i32.const))))
+(module (func
+ i32.const
+ i32.convert.i32))
(;; STDERR ;;;
-parse/expr/bad-convert-int-no-sign.txt:2:16: unexpected token "i32.convert.i32"
-(module (func (i32.convert.i32 (i32.const))))
- ^^^^^^^^^^^^^^^
-parse/expr/bad-convert-int-no-sign.txt:2:32: syntax error, unexpected (
-(module (func (i32.convert.i32 (i32.const))))
- ^
+parse/expr/bad-convert-int-no-sign.txt:4:11: unexpected token "i32.convert.i32"
+ i32.convert.i32))
+ ^^^^^^^^^^^^^^^
+parse/expr/bad-convert-int-no-sign.txt:4:26: syntax error, unexpected ), expecting NAT or INT or FLOAT
+ i32.convert.i32))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-getglobal-name-undefined.txt b/test/parse/expr/bad-getglobal-name-undefined.txt
index 12022faa..5ead3821 100644
--- a/test/parse/expr/bad-getglobal-name-undefined.txt
+++ b/test/parse/expr/bad-getglobal-name-undefined.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (get_global 0)))
+(module (func get_global 0))
(;; STDERR ;;;
-parse/expr/bad-getglobal-name-undefined.txt:2:27: global variable out of range (max 0)
-(module (func (get_global 0)))
- ^
+parse/expr/bad-getglobal-name-undefined.txt:2:26: global variable out of range (max 0)
+(module (func get_global 0))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-getglobal-undefined.txt b/test/parse/expr/bad-getglobal-undefined.txt
index 7e9edaf2..c2ba9d6f 100644
--- a/test/parse/expr/bad-getglobal-undefined.txt
+++ b/test/parse/expr/bad-getglobal-undefined.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (get_global 0)))
+(module (func get_global 0))
(;; STDERR ;;;
-parse/expr/bad-getglobal-undefined.txt:2:27: global variable out of range (max 0)
-(module (func (get_global 0)))
- ^
+parse/expr/bad-getglobal-undefined.txt:2:26: global variable out of range (max 0)
+(module (func get_global 0))
+ ^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-getlocal-name-undefined.txt b/test/parse/expr/bad-getlocal-name-undefined.txt
index 25ac7df8..51181743 100644
--- a/test/parse/expr/bad-getlocal-name-undefined.txt
+++ b/test/parse/expr/bad-getlocal-name-undefined.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
-(module (func (get_local $n)))
+(module (func get_local $n))
(;; STDERR ;;;
-parse/expr/bad-getlocal-name-undefined.txt:2:26: undefined local variable "$n"
-(module (func (get_local $n)))
- ^^
+parse/expr/bad-getlocal-name-undefined.txt:2:25: undefined local variable "$n"
+(module (func get_local $n))
+ ^^
;;; STDERR ;;)
diff --git a/test/parse/expr/bad-getlocal-name.txt b/test/parse/expr/bad-getlocal-name.txt
index 89af7f3e..ca79fc59 100644
--- a/test/parse/expr/bad-getlocal-name.txt
+++ b/test/parse/expr/bad-getlocal-name.txt
@@ -1,10 +1,10 @@
;;; ERROR: 1
-(module (func (local $f f32) (get_local f)))
+(module (func (local $f f32) get_local f))
(;; STDERR ;;;
-parse/expr/bad-getlocal-name.txt:2:41: unexpected token "f"
-(module (func (local $f f32) (get_local f)))
+parse/expr/bad-getlocal-name.txt:2:40: unexpected token "f"
+(module (func (local $f f32) get_local f))
+ ^
+parse/expr/bad-getlocal-name.txt:2:41: syntax error, unexpected ), expecting NAT or VAR
+(module (func (local $f f32) get_local f))
^
-parse/expr/bad-getlocal-name.txt:2:42: syntax error, unexpected ), expecting NAT or VAR
-(module (func (local $f f32) (get_local f)))
- ^
;;; STDERR ;;)