diff options
author | Eduardo Julian | 2018-08-20 23:21:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-20 23:21:01 -0400 |
commit | a1944a9d561e76b02717673647b87704118c03a6 (patch) | |
tree | 36a76c0a82a9dd120152366aee3f4e1e307f8377 /stdlib/test | |
parent | 726dbf02da1ae0da3965ec0a72e99fec1730f882 (diff) |
- More minor optimizations.
- Removed ratio syntax for Frac.
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/compiler/default/syntax.lux | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/stdlib/test/test/lux/compiler/default/syntax.lux b/stdlib/test/test/lux/compiler/default/syntax.lux index 2b4a8f5b6..a9baa546c 100644 --- a/stdlib/test/test/lux/compiler/default/syntax.lux +++ b/stdlib/test/test/lux/compiler/default/syntax.lux @@ -112,42 +112,6 @@ (:: code.Equivalence<Code> = other =other))))) )))) -(context: "Frac special syntax." - (<| (times 100) - (do @ - [numerator (|> r.nat (:: @ map (|>> (n/% 100) .int int-to-frac))) - denominator (|> r.nat (:: @ map (|>> (n/% 100) (n/max 1) .int int-to-frac))) - signed? r.bit - #let [expected (|> numerator (f// denominator) (f/* (if signed? -1.0 +1.0)))]] - (test "Can parse frac ratio syntax." - (case (&.read "" (dict.new text.Hash<Text>) - [default-cursor 0 - (format (if signed? "-" "+") - (%i (frac-to-int numerator)) - "/" - (%i (frac-to-int denominator)))]) - (#e.Success [_ [_ (#.Frac actual)]]) - (f/= expected actual) - - _ - #0) - )))) - -(context: "Nat special syntax." - (<| (times 100) - (do @ - [expected (|> r.nat (:: @ map (n/% 1_000)))] - (test "Can parse nat char syntax." - (case (&.read "" (dict.new text.Hash<Text>) - [default-cursor 0 - (format "#" (%t (text.from-code expected)) "")]) - (#e.Success [_ [_ (#.Nat actual)]]) - (n/= expected actual) - - _ - #0) - )))) - (def: comment-text^ (r.Random Text) (let [char-gen (|> r.nat (r.filter (function (_ value) |