aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-01-12 23:09:05 -0400
committerEduardo Julian2021-01-12 23:09:05 -0400
commit71de092a045dc70ab1c9eead477cf1512b144a87 (patch)
tree1f71aca655d867b748c430996d3687911b7537cc /stdlib/source/test/aedifex/artifact/time.lux
parent5dbf134346424602b0104d1f749c1a9eac6f21af (diff)
Raise error when trying to use deprecated fields/method/classes in JVM.
Diffstat (limited to 'stdlib/source/test/aedifex/artifact/time.lux')
-rw-r--r--stdlib/source/test/aedifex/artifact/time.lux42
1 files changed, 42 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux
new file mode 100644
index 000000000..880bc1f83
--- /dev/null
+++ b/stdlib/source/test/aedifex/artifact/time.lux
@@ -0,0 +1,42 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
+ [control
+ ["." try ("#\." functor)]
+ [parser
+ ["<.>" text]]]
+ [math
+ ["." random]]
+ [time
+ ["." instant]]]
+ {#program
+ ["." /]}
+ ["." / #_
+ ["#." date]
+ ["#." time]])
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Time])
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence random.instant))
+
+ (do random.monad
+ [expected random.instant]
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ (<text>.run /.parser)
+ (try\map (\ instant.equivalence = expected))
+ (try.default false))))
+
+ /date.test
+ /time.test
+ )))