From e814f667aed509a70bd386dcd54628929134def4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 26 Aug 2021 02:34:05 -0400 Subject: "Interface" instead of "interface:", and "Rec" can be used in type definition. --- stdlib/source/test/lux.lux | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'stdlib/source/test/lux.lux') 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 -- cgit v1.2.3