diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/time/duration.lux | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/stdlib/test/test/lux/time/duration.lux b/stdlib/test/test/lux/time/duration.lux index d10b9b57c..4a674420e 100644 --- a/stdlib/test/test/lux/time/duration.lux +++ b/stdlib/test/test/lux/time/duration.lux @@ -1,8 +1,7 @@ (;module: lux (lux [io] - (control [monad #+ do Monad] - [pipe]) + (control [monad #+ do Monad]) (data ["R" result]) (math ["r" random]) (time ["@" duration])) @@ -34,7 +33,6 @@ (@/<= reference sample))))) (context: "Arithmetic." - #seed +16674263968423793 [sample (|> duration (:: @ map (@;frame @;day))) frame duration factor (|> r;int (:: @ map (|>. (i.% 10) (i.max 1)))) @@ -64,17 +62,11 @@ frame)))))))) (context: "Codec" - #seed +9664448049824422386 [sample duration #let [(^open "@/") @;Eq<Duration> (^open "@/") @;Codec<Text,Duration>]] - (exec - (test "Can encode/decode durations." - (|> sample - @/encode - @/decode - (pipe;case> (#R;Success decoded) - (@/= sample decoded) - - (#R;Error error) - false))))) + (test "Can encode/decode durations." + (R;default false + (do R;Monad<Result> + [decoded (|> sample @/encode @/decode)] + (wrap (@/= sample decoded)))))) |