aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
)))