Skip to content

Commit

Permalink
Re-enable spec tests requiring multivalue
Browse files Browse the repository at this point in the history
And delete tests that no longer pass now that multivalue is standard.
  • Loading branch information
tlively committed Jun 20, 2024
1 parent baa8b95 commit 8dbc1f5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 42 deletions.
2 changes: 0 additions & 2 deletions scripts/test/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,6 @@ def get_tests(test_dir, extensions=[], recursive=False):
'linking.wast',

# Invalid module accepted
'func.wast',
'type.wast',
'unreached-invalid.wast',

# Test invalid
Expand Down
13 changes: 0 additions & 13 deletions test/spec/func.wast
Original file line number Diff line number Diff line change
Expand Up @@ -489,19 +489,6 @@

;; Invalid typing of result

(assert_invalid
(module (func $type-multiple-result (result i32 i32) (unreachable)))
"invalid result arity"
)
(assert_invalid
(module
(type (func (result i32 i32)))
(func $type-multiple-result (type 0) (unreachable))
)
"invalid result arity"
)


(assert_invalid
(module (func $type-empty-i32 (result i32)))
"type mismatch"
Expand Down
45 changes: 18 additions & 27 deletions test/spec/type.wast
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@
(type (func (param $x i32) (result i32)))

(type (func (param f32 f64)))
;; (type (func (result i64 f32)))
;; (type (func (param i32 i64) (result f32 f64)))
(type (func (result i64 f32)))
(type (func (param i32 i64) (result f32 f64)))

(type (func (param f32) (param f64)))
(type (func (param $x f32) (param f64)))
(type (func (param f32) (param $y f64)))
(type (func (param $x f32) (param $y f64)))
;; (type (func (result i64) (result f32)))
;; (type (func (param i32) (param i64) (result f32) (result f64)))
;; (type (func (param $x i32) (param $y i64) (result f32) (result f64)))
(type (func (result i64) (result f32)))
(type (func (param i32) (param i64) (result f32) (result f64)))
(type (func (param $x i32) (param $y i64) (result f32) (result f64)))

(type (func (param f32 f64) (param $x i32) (param f64 i32 i32)))
;; (type (func (result i64 i64 f32) (result f32 i32)))
;; (type
;; (func (param i32 i32) (param i64 i32) (result f32 f64) (result f64 i32))
;; )
(type (func (result i64 i64 f32) (result f32 i32)))
(type
(func (param i32 i32) (param i64 i32) (result f32 f64) (result f64 i32))
)

(type (func (param) (param $x f32) (param) (param) (param f64 i32) (param)))
;; (type
;; (func (result) (result) (result i64 i64) (result) (result f32) (result))
;; )
;; (type
;; (func
;; (param i32 i32) (param i64 i32) (param) (param $x i32) (param)
;; (result) (result f32 f64) (result f64 i32) (result)
;; )
;; )
(type
(func (result) (result) (result i64 i64) (result) (result f32) (result))
)
(type
(func
(param i32 i32) (param i64 i32) (param) (param $x i32) (param)
(result) (result f32 f64) (result f64 i32) (result)
)
)
)

(assert_malformed
Expand All @@ -48,12 +48,3 @@
(module quote "(type (func (result $x i32)))")
"unexpected token"
)

(assert_invalid
(module (type (func (result i32 i32))))
"invalid result arity"
)
(assert_invalid
(module (type (func (result i32) (result i32))))
"invalid result arity"
)

0 comments on commit 8dbc1f5

Please sign in to comment.