diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/number.lux | 2 | ||||
-rw-r--r-- | stdlib/test/test/lux/cli.lux | 8 | ||||
-rw-r--r-- | stdlib/test/test/lux/math/ratio.lux | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux index 046e681b8..8b3081d14 100644 --- a/stdlib/source/lux/data/number.lux +++ b/stdlib/source/lux/data/number.lux @@ -152,7 +152,7 @@ #;None (#;Left <error>))))] - [Nat ["nat" "encode"] ["nat" "decode"] "Couldn't decode Nat"] + [Nat ["nat" "encode"] ["nat" "decode"] "Couldn't decode Nat"] [Frac ["frac" "encode"] ["frac" "decode"] "Couldn't decode Frac"] ) 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." |