aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/time/instant.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/time/instant.lux')
-rw-r--r--stdlib/source/test/lux/time/instant.lux17
1 files changed, 7 insertions, 10 deletions
diff --git a/stdlib/source/test/lux/time/instant.lux b/stdlib/source/test/lux/time/instant.lux
index f2e44cead..3849c7b67 100644
--- a/stdlib/source/test/lux/time/instant.lux
+++ b/stdlib/source/test/lux/time/instant.lux
@@ -11,13 +11,13 @@
["$." enum]
["$." codec]]}]
[control
- pipe]
+ ["." try]]
[data
["." text]
[number
["i" int]]]
[math
- ["r" random (#+ Random)]]
+ ["." random (#+ Random)]]
[time
["@d" duration]
["@date" date]]]
@@ -26,11 +26,9 @@
{1
["." / (#+ Instant)]})
-(def: boundary Int +99,999,999,999,999)
-
(def: #export instant
(Random Instant)
- (:: r.monad map (|>> (i.% boundary) /.from-millis) r.int))
+ (:: random.monad map /.from-millis random.int))
(def: #export test
Test
@@ -39,14 +37,13 @@
($equivalence.spec /.equivalence ..instant)
($order.spec /.order ..instant)
($enum.spec /.enum ..instant)
- ## TODO; Uncomment ASAP
- ## ($codec.spec /.equivalence /.codec ..instant)
+ ($codec.spec /.equivalence /.codec ..instant)
- (do r.monad
- [millis r.int]
+ (do random.monad
+ [millis random.int]
(_.test "Can convert from/to milliseconds."
(|> millis /.from-millis /.to-millis (i.= millis))))
- (do r.monad
+ (do random.monad
[sample instant
span _duration.duration
#let [(^open "@/.") /.equivalence