finish factoring tests (#17)
* atoms in one test unit * factor out pointers test * factor structs into separate test unit * factor out arrays, flags * finally, separate into strings and ints
This commit is contained in:
23
tests/structs.witx
Normal file
23
tests/structs.witx
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
(use "errno.witx")
|
||||
|
||||
(typename $pair_ints
|
||||
(struct
|
||||
(field $first s32)
|
||||
(field $second s32)))
|
||||
|
||||
(typename $pair_int_ptrs
|
||||
(struct
|
||||
(field $first (@witx const_pointer s32))
|
||||
(field $second (@witx const_pointer s32))))
|
||||
|
||||
(module $structs
|
||||
(@interface func (export "sum_of_pair")
|
||||
(param $an_pair $pair_ints)
|
||||
(result $error $errno)
|
||||
(result $doubled s64))
|
||||
(@interface func (export "sum_of_pair_of_ptrs")
|
||||
(param $an_pair $pair_int_ptrs)
|
||||
(result $error $errno)
|
||||
(result $doubled s64))
|
||||
)
|
||||
Reference in New Issue
Block a user