aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-28 04:48:42 -0400
committerEduardo Julian2021-07-28 04:48:42 -0400
commit5d4583aebd00adced10275b32ff1a93ab418be50 (patch)
tree89315e104e2b0ddd6d56f894f01a0575d3078699 /stdlib/source/test/lux.lux
parent061fd8a209bbcaffc2bfb850ac6046752a567d50 (diff)
Re-named List's tags: Nil => End && Cons => Item
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r--stdlib/source/test/lux.lux18
1 files changed, 18 insertions, 0 deletions
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
)))