diff options
author | Eduardo Julian | 2021-08-26 02:34:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-26 02:34:05 -0400 |
commit | e814f667aed509a70bd386dcd54628929134def4 (patch) | |
tree | 0a948502194c846a66396020420bd99c6c68370a /stdlib/source/test/lux.lux | |
parent | b216900093c905b3b20dd45c69e577b192e2f7a3 (diff) |
"Interface" instead of "interface:", and "Rec" can be used in type definition.
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r-- | stdlib/source/test/lux.lux | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index a072fbc25..df0eb2f09 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -227,9 +227,10 @@ false)) ))) -(/.interface: (Returner a) - (: (-> Any a) - return)) +(type: (Returner a) + (/.Interface + (: (-> Any a) + return))) (/.implementation: (global_returner value) (All [a] (-> a (Returner a))) @@ -249,7 +250,7 @@ (/.implementation (def: (return _) expected)))]] - (_.for [/.interface:] + (_.for [/.Interface] ($_ _.and (_.cover [/.implementation:] (n.= expected (\ (global_returner expected) return []))) @@ -557,6 +558,17 @@ (: /.Type ..for_type/record) (: /.Type ..for_type/all) true)) + (_.cover [/.Variant] + (exec + (: for_type/variant + (#Case/1 expected_left)) + true)) + (_.cover [/.Record] + (exec + (: for_type/record + {#slot/0 (n.= expected_left expected_right) + #slot/1 (.rev expected_right)}) + true)) )))) (def: for_i64 |