aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
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
parent75102dcfa7c2c0afd32cb5bf5ac012df2db6a7a1 (diff)
Moved "log!" function under "lux/debug".
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r--stdlib/source/test/aedifex/artifact.lux3
-rw-r--r--stdlib/source/test/aedifex/artifact/time_stamp.lux33
2 files changed, 35 insertions, 1 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux
index 60619f78b..dc2de91f7 100644
--- a/stdlib/source/test/aedifex/artifact.lux
+++ b/stdlib/source/test/aedifex/artifact.lux
@@ -21,7 +21,7 @@
["." / #_
["#." type]
["#." extension]
- ["#." time_stamp #_
+ ["#." time_stamp
["#/." date]
["#/." time]]]
{#program
@@ -45,6 +45,7 @@
/type.test
/extension.test
+ /time_stamp.test
/time_stamp/date.test
/time_stamp/time.test
))))
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))))
+ )))