aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time/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/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/time.lux')
-rw-r--r--stdlib/source/test/aedifex/artifact/time/time.lux31
1 files changed, 31 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux
new file mode 100644
index 000000000..bd9bbe071
--- /dev/null
+++ b/stdlib/source/test/aedifex/artifact/time/time.lux
@@ -0,0 +1,31 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ ["." time (#+ Time)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try ("#\." functor)]
+ [parser
+ ["<.>" text]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["i" int]]]]
+ {#program
+ ["." /]})
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ ($_ _.and
+ (do random.monad
+ [expected random.time]
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ (<text>.run /.parser)
+ (try\map (\ time.equivalence = expected))
+ (try.default false))))
+ )))