From 5d4583aebd00adced10275b32ff1a93ab418be50 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 28 Jul 2021 04:48:42 -0400 Subject: Re-named List's tags: Nil => End && Cons => Item --- stdlib/source/test/lux.lux | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'stdlib/source/test/lux.lux') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index de99ee775..bfdc93f30 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -972,6 +972,23 @@ (is? post (io.run (atom.read box))))))) )) +(def: identity/constant + (All [a] (-> a a)) + (function (_ value) + value)) + +(def: (identity/function value) + (All [a] (-> a a)) + value) + +(def: for_def: + Test + (do random.monad + [expected random.nat] + (_.cover [/.def:] + (and (is? expected (identity/constant expected)) + (is? expected (identity/function expected)))))) + (def: test Test (<| (_.covering /._) @@ -995,6 +1012,7 @@ ..for_value ..for_case ..for_control_flow + ..for_def: ..sub_tests ))) -- cgit v1.2.3