Fix wiggle tests
This commit is contained in:
committed by
Andrew Brown
parent
df9c725fa0
commit
fa98f0bc91
@@ -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)))
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user