aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2018-12-03 23:42:02 -0400
committerEduardo Julian2018-12-03 23:42:02 -0400
commitf58ab9dfeb272289989bcf5358ddb2faf273eefe (patch)
treed8c94de0946335ea2f340630431ce05b164d3c34 /stdlib/test
parent53d2451a44e1241ec2c4b14e07b501156f792d71 (diff)
Excised contribution relevant to this: https://github.com/LuxLang/lux/pull/34
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/time/duration.lux28
1 files changed, 1 insertions, 27 deletions
diff --git a/stdlib/test/test/lux/time/duration.lux b/stdlib/test/test/lux/time/duration.lux
index 669af6b4c..8bf00b88b 100644
--- a/stdlib/test/test/lux/time/duration.lux
+++ b/stdlib/test/test/lux/time/duration.lux
@@ -57,30 +57,4 @@
(test "Merging with the empty duration changes nothing."
(|> sample (@.merge @.empty) (@/= sample)))
(test "Merging a duration with it's opposite yields an empty duration."
- (|> sample (@.merge (@.scale-up -1 sample)) (@/= @.empty)))
- (test "Can frame a duration in terms of another."
- (cond (and (@.positive? frame) (@.positive? sample))
- (|> sample (@.frame frame) (@/< frame))
-
- (and (@.negative? frame) (@.negative? sample))
- (|> sample (@.frame frame) (@/> frame))
-
- (or (or (@.neutral? frame) (@.neutral? sample))
- (|> sample
- (@.frame frame)
- (@.scale-up -1)
- (@/< (if (@.negative? frame)
- (@.scale-up -1 frame)
- frame))))))))))
-
-(context: "Codec"
- (<| (times 100)
- (do @
- [sample duration
- #let [(^open "@/.") @.Equivalence<Duration>
- (^open "@/.") @.Codec<Text,Duration>]]
- (test "Can encode/decode durations."
- (E.default #0
- (do E.Monad<Error>
- [decoded (|> sample @/encode @/decode)]
- (wrap (@/= sample decoded))))))))
+ (|> sample (@.merge (@.scale-up -1 sample)) (@/= @.empty)))))))