aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2016-12-22 00:36:51 -0400
committerEduardo Julian2016-12-22 00:36:51 -0400
commit168c783c2aa203316846e4f86de30f0735e51917 (patch)
tree306ae9513df9f81369ff4dcaf8e96012e4df6a8f /stdlib/test
parentbb7adb6ddc72c8fba6c868b396dbb31e53224ee9 (diff)
- Updated tests for lux/cli and lux/math/ratio.
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/cli.lux8
-rw-r--r--stdlib/test/test/lux/math/ratio.lux1
2 files changed, 5 insertions, 4 deletions
diff --git a/stdlib/test/test/lux/cli.lux b/stdlib/test/test/lux/cli.lux
index cecc2306f..31f119828 100644
--- a/stdlib/test/test/lux/cli.lux
+++ b/stdlib/test/test/lux/cli.lux
@@ -20,7 +20,7 @@
lux/test)
(test: "CLI"
- [num-args (:: @ map (n.% +10) R;nat)
+ [num-args (|> R;nat (:: @ map (n.% +10)))
#let [(^open "Nat/") number;Codec<Text,Nat>
gen-arg (:: @ map Nat/encode R;nat)]
option-name (R;text +5)
@@ -92,7 +92,9 @@
(assert "Can query if there are any more inputs."
(and (|> (&;run &;end args)
- (case> (#;Right []) (n.= +0 num-args) _ false))
+ (case> (#;Right []) (n.= +0 num-args)
+ _ (n.> +0 num-args)))
(|> (&;run (&;not &;end) args)
- (case> (#;Right []) (not (n.= +0 num-args)) _ false))))
+ (case> (#;Right []) (n.> +0 num-args)
+ _ (n.= +0 num-args)))))
))
diff --git a/stdlib/test/test/lux/math/ratio.lux b/stdlib/test/test/lux/math/ratio.lux
index 6bea37e0c..55e6fe920 100644
--- a/stdlib/test/test/lux/math/ratio.lux
+++ b/stdlib/test/test/lux/math/ratio.lux
@@ -101,7 +101,6 @@
))
(test: "Codec"
- #seed +1482192000042
[sample gen-ratio
#let [(^open "&/") &;Codec<Text,Ratio>]]
(assert "Can encode/decode ratios."