aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time_stamp.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-01-08 19:23:52 -0400
committerEduardo Julian2021-01-08 19:23:52 -0400
commit1ce30d50abaa330ab2125b110e245de6deda27c7 (patch)
tree6b40e5d5f1282d33dbd31e64b1753fd0c31be79b /stdlib/source/test/aedifex/artifact/time_stamp.lux
parent75102dcfa7c2c0afd32cb5bf5ac012df2db6a7a1 (diff)
Moved "log!" function under "lux/debug".
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/time_stamp.lux33
1 files changed, 33 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time_stamp.lux b/stdlib/source/test/aedifex/artifact/time_stamp.lux
new file mode 100644
index 000000000..7dea57392
--- /dev/null
+++ b/stdlib/source/test/aedifex/artifact/time_stamp.lux
@@ -0,0 +1,33 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try ("#\." functor)]
+ [parser
+ ["<.>" text]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["i" int]]]
+ [time
+ ["." instant]]]
+ {#program
+ ["." /]})
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Time_Stamp])
+ ($_ _.and
+ (do random.monad
+ [expected random.instant]
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ (<text>.run /.parser)
+ (try\map (\ instant.equivalence = expected))
+ (try.default false))))
+ )))