diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/parse/assert/assert-after-module.txt | 4 | ||||
-rw-r--r-- | test/parse/assert/assertinvalid.txt | 17 | ||||
-rw-r--r-- | test/parse/assert/assertreturn.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/assertreturnnan.txt | 4 | ||||
-rw-r--r-- | test/parse/assert/bad-assertinvalid-succeeds.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturn-non-const.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturn-too-few.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturn-too-many.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturnnan-invalid-return-type.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturnnan-too-few.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/bad-assertreturnnan-too-many.txt | 5 | ||||
-rw-r--r-- | test/parse/assert/invoke.txt | 4 | ||||
-rw-r--r-- | test/parse/expr/bad-binary-one-expr.txt | 14 |
13 files changed, 50 insertions, 33 deletions
diff --git a/test/parse/assert/assert-after-module.txt b/test/parse/assert/assert-after-module.txt index e94e2f35..caa09bc3 100644 --- a/test/parse/assert/assert-after-module.txt +++ b/test/parse/assert/assert-after-module.txt @@ -1,5 +1,7 @@ ;;; FLAGS: --spec (module (export "f" (func 0)) - (func (result i32) (return (i32.const 0)))) + (func (result i32) + i32.const 0 + return)) (assert_return (invoke "f") (i32.const 0)) diff --git a/test/parse/assert/assertinvalid.txt b/test/parse/assert/assertinvalid.txt index 97e8e1d9..f0a64637 100644 --- a/test/parse/assert/assertinvalid.txt +++ b/test/parse/assert/assertinvalid.txt @@ -1,26 +1,27 @@ ;;; FLAGS: --spec (assert_invalid (module - (func - (drop (i32.const 1))) + (func + i32.const 1 + drop) (export "foo" (func 1))) "unknown function 1") ;; string is ignored (assert_invalid (module (func (result i32) - (nop))) + nop)) "type mismatch") (;; STDOUT ;;; assert_invalid error: - parse/assert/assertinvalid.txt:6:25: function variable out of range (max 1) + parse/assert/assertinvalid.txt:7:25: function variable out of range (max 1) (export "foo" (func 1))) ^ assert_invalid error: - parse/assert/assertinvalid.txt:10:5: type stack size too small at function. got 0, expected at least 1 + parse/assert/assertinvalid.txt:11:5: type stack size too small at function. got 0, expected at least 1 (func (result i32) - ^^^^^^^^ + ^^^^^^ assert_invalid error: - parse/assert/assertinvalid.txt:10:5: type stack at end of function is 0. expected 1 + parse/assert/assertinvalid.txt:11:5: type stack at end of function is 0. expected 1 (func (result i32) - ^^^^^^^^ + ^^^^^^ ;;; STDOUT ;;) diff --git a/test/parse/assert/assertreturn.txt b/test/parse/assert/assertreturn.txt index 9012bc8f..301dcf78 100644 --- a/test/parse/assert/assertreturn.txt +++ b/test/parse/assert/assertreturn.txt @@ -1,8 +1,9 @@ ;;; FLAGS: --spec (module - (func $foo (result i32) (i32.const 0)) + (func $foo (result i32) i32.const 0) (export "foo" (func $foo)) - (func $bar (param f32) (result f32) (get_local 0)) + (func $bar (param f32) (result f32) + get_local 0) (export "bar" (func $bar))) (assert_return (invoke "foo") (i32.const 0)) diff --git a/test/parse/assert/assertreturnnan.txt b/test/parse/assert/assertreturnnan.txt index 4570e8b6..c570d89d 100644 --- a/test/parse/assert/assertreturnnan.txt +++ b/test/parse/assert/assertreturnnan.txt @@ -1,7 +1,9 @@ ;;; FLAGS: --spec (module (func $foo (param f32) (result f32) - (f32.div (get_local 0) (f32.const 0))) + get_local 0 + f32.const 0 + f32.div) (export "foo" (func $foo))) (assert_return_nan diff --git a/test/parse/assert/bad-assertinvalid-succeeds.txt b/test/parse/assert/bad-assertinvalid-succeeds.txt index e3f26c6a..3635a721 100644 --- a/test/parse/assert/bad-assertinvalid-succeeds.txt +++ b/test/parse/assert/bad-assertinvalid-succeeds.txt @@ -1,10 +1,11 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (assert_invalid - (module (func (result i32) (i32.const 0))) + (module (func (result i32) + i32.const 0)) "success") (;; STDERR ;;; parse/assert/bad-assertinvalid-succeeds.txt:4:4: expected module to be invalid - (module (func (result i32) (i32.const 0))) + (module (func (result i32) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturn-non-const.txt b/test/parse/assert/bad-assertreturn-non-const.txt index 595301d6..da95c3ec 100644 --- a/test/parse/assert/bad-assertreturn-non-const.txt +++ b/test/parse/assert/bad-assertreturn-non-const.txt @@ -1,7 +1,8 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $bar (param f32) (result f32) (get_local 0)) + (func $bar (param f32) (result f32) + get_local 0) (export "bar" (func $bar))) ;; NOT ok to use more complex exprs @@ -10,7 +11,7 @@ (f32.add (f32.const 1) (f32.const 10))) (f32.const 11)) (;; STDERR ;;; -parse/assert/bad-assertreturn-non-const.txt:10:6: syntax error, unexpected BINARY, expecting CONST +parse/assert/bad-assertreturn-non-const.txt:11:6: syntax error, unexpected BINARY, expecting CONST (f32.add (f32.const 1) (f32.const 10))) ^^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturn-too-few.txt b/test/parse/assert/bad-assertreturn-too-few.txt index c6650ba3..4da08d54 100644 --- a/test/parse/assert/bad-assertreturn-too-few.txt +++ b/test/parse/assert/bad-assertreturn-too-few.txt @@ -1,11 +1,12 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $foo (param i32) (result i32) (get_local 0)) + (func $foo (param i32) (result i32) + get_local 0) (export "foo" (func $foo))) (assert_return (invoke "foo") (i32.const 0)) (;; STDERR ;;; -parse/assert/bad-assertreturn-too-few.txt:6:17: too few parameters to function. got 0, expected 1 +parse/assert/bad-assertreturn-too-few.txt:7:17: too few parameters to function. got 0, expected 1 (assert_return (invoke "foo") (i32.const 0)) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturn-too-many.txt b/test/parse/assert/bad-assertreturn-too-many.txt index 08c07ba7..85c7929b 100644 --- a/test/parse/assert/bad-assertreturn-too-many.txt +++ b/test/parse/assert/bad-assertreturn-too-many.txt @@ -1,11 +1,12 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $foo (result i32) (i32.const 0)) + (func $foo (result i32) + i32.const 0) (export "foo" (func $foo))) (assert_return (invoke "foo" (i32.const 0)) (i32.const 0)) (;; STDERR ;;; -parse/assert/bad-assertreturn-too-many.txt:6:17: too many parameters to function. got 1, expected 0 +parse/assert/bad-assertreturn-too-many.txt:7:17: too many parameters to function. got 1, expected 0 (assert_return (invoke "foo" (i32.const 0)) (i32.const 0)) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturnnan-invalid-return-type.txt b/test/parse/assert/bad-assertreturnnan-invalid-return-type.txt index 4a9347b8..d1f91d27 100644 --- a/test/parse/assert/bad-assertreturnnan-invalid-return-type.txt +++ b/test/parse/assert/bad-assertreturnnan-invalid-return-type.txt @@ -1,12 +1,13 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $foo (result i32) (i32.const 0)) + (func $foo (result i32) + i32.const 0) (export "foo" (func $foo))) (assert_return_nan (invoke "foo")) (;; STDERR ;;; -parse/assert/bad-assertreturnnan-invalid-return-type.txt:7:21: type mismatch at action. got i32, expected f32 or f64 +parse/assert/bad-assertreturnnan-invalid-return-type.txt:8:21: type mismatch at action. got i32, expected f32 or f64 (assert_return_nan (invoke "foo")) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturnnan-too-few.txt b/test/parse/assert/bad-assertreturnnan-too-few.txt index 249d48e7..871c6f96 100644 --- a/test/parse/assert/bad-assertreturnnan-too-few.txt +++ b/test/parse/assert/bad-assertreturnnan-too-few.txt @@ -1,11 +1,12 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $foo (param i32) (result f32) (f32.const 0)) + (func $foo (param i32) (result f32) + f32.const 0) (export "foo" (func $foo))) (assert_return_nan (invoke "foo")) (;; STDERR ;;; -parse/assert/bad-assertreturnnan-too-few.txt:6:21: too few parameters to function. got 0, expected 1 +parse/assert/bad-assertreturnnan-too-few.txt:7:21: too few parameters to function. got 0, expected 1 (assert_return_nan (invoke "foo")) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/bad-assertreturnnan-too-many.txt b/test/parse/assert/bad-assertreturnnan-too-many.txt index 71f1134a..65644f83 100644 --- a/test/parse/assert/bad-assertreturnnan-too-many.txt +++ b/test/parse/assert/bad-assertreturnnan-too-many.txt @@ -1,11 +1,12 @@ ;;; ERROR: 1 ;;; FLAGS: --spec (module - (func $foo (result f32) (f32.const 0)) + (func $foo (result f32) + f32.const 0) (export "foo" (func $foo))) (assert_return_nan (invoke "foo" (f32.const 0))) (;; STDERR ;;; -parse/assert/bad-assertreturnnan-too-many.txt:6:21: too many parameters to function. got 1, expected 0 +parse/assert/bad-assertreturnnan-too-many.txt:7:21: too many parameters to function. got 1, expected 0 (assert_return_nan (invoke "foo" (f32.const 0))) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/assert/invoke.txt b/test/parse/assert/invoke.txt index ba6eb45a..393c000e 100644 --- a/test/parse/assert/invoke.txt +++ b/test/parse/assert/invoke.txt @@ -2,7 +2,9 @@ (module (export "test" (func $test)) (func $test (param i32) (result i32) - (i32.add (get_local 0) (i32.const 100)))) + get_local 0 + i32.const 100 + i32.add)) (invoke "test" (i32.const 1)) (invoke "test" (i32.const 100)) diff --git a/test/parse/expr/bad-binary-one-expr.txt b/test/parse/expr/bad-binary-one-expr.txt index 716cd6e1..3422ea32 100644 --- a/test/parse/expr/bad-binary-one-expr.txt +++ b/test/parse/expr/bad-binary-one-expr.txt @@ -1,10 +1,12 @@ ;;; ERROR: 1 -(module (func (i32.add (i32.const 0)))) +(module (func + i32.const 0 + i32.add)) (;; STDERR ;;; -parse/expr/bad-binary-one-expr.txt:2:16: type stack size too small at i32.add. got 1, expected at least 2 -(module (func (i32.add (i32.const 0)))) - ^^^^^^^ +parse/expr/bad-binary-one-expr.txt:4:4: type stack size too small at i32.add. got 1, expected at least 2 + i32.add)) + ^^^^^^^ parse/expr/bad-binary-one-expr.txt:2:9: type stack at end of function is 2. expected 0 -(module (func (i32.add (i32.const 0)))) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +(module (func + ^^^ ;;; STDERR ;;) |