Fix wiggle tests

This commit is contained in:
Alex Crichton
2021-02-17 13:42:41 -08:00
committed by Andrew Brown
parent df9c725fa0
commit fa98f0bc91
31 changed files with 236 additions and 239 deletions

View File

@@ -5,27 +5,26 @@
;; Fight for the full product of your labor!
(typename $reason
(union $excuse
(field $dog_ate f32)
(field $traffic s32)
(empty $sleeping)))
(variant (@witx tag $excuse)
(case $dog_ate f32)
(case $traffic s32)
(case $sleeping)))
(typename $reason_mut
(union $excuse
(field $dog_ate (@witx pointer f32))
(field $traffic (@witx pointer s32))
(empty $sleeping)))
(variant (@witx tag $excuse)
(case $dog_ate (@witx pointer f32))
(case $traffic (@witx pointer s32))
(case $sleeping)))
(module $union_example
(@interface func (export "get_tag")
(param $r $reason)
(result $error $errno)
(result $t $excuse)
(result $error (expected $excuse (error $errno)))
)
(@interface func (export "reason_mult")
(param $r $reason_mut)
(param $multiply_by u32)
(result $error $errno)
(result $error (expected (error $errno)))
)
)