diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/math/infix.lux | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/math/infix.lux b/stdlib/source/test/lux/math/infix.lux index e2850f549..8085d5f98 100644 --- a/stdlib/source/test/lux/math/infix.lux +++ b/stdlib/source/test/lux/math/infix.lux @@ -7,6 +7,7 @@ [data ["." bit ("#@." equivalence)] [number + ["n" nat] ["f" frac]]]] {1 ["." / @@ -22,23 +23,23 @@ angle r.frac] ($_ _.and (_.test "Constant values don't change." - (n/= subject + (n.= subject (/.infix subject))) (_.test "Can call binary functions." - (n/= (//.n/gcd parameter subject) - (/.infix [subject //.n/gcd parameter]))) + (n.= (n.gcd parameter subject) + (/.infix [subject n.gcd parameter]))) (_.test "Can call unary functions." (f.= (//.sin angle) (/.infix [//.sin angle]))) (_.test "Can use regular syntax in the middle of infix code." - (n/= (//.n/gcd extra (n/* parameter subject)) - (/.infix [(n/* parameter subject) //.n/gcd extra]))) + (n.= (n.gcd extra (n.* parameter subject)) + (/.infix [(n.* parameter subject) n.gcd extra]))) (_.test "Can use non-numerical functions/macros as operators." - (bit@= (and (n/< parameter subject) (n/< extra parameter)) - (/.infix [[subject n/< parameter] and [parameter n/< extra]]))) + (bit@= (and (n.< parameter subject) (n.< extra parameter)) + (/.infix [[subject n.< parameter] and [parameter n.< extra]]))) (_.test "Can combine bit operations in special ways via special keywords." - (and (bit@= (and (n/< parameter subject) (n/< extra parameter)) - (/.infix [#and subject n/< parameter n/< extra])) - (bit@= (and (n/< parameter subject) (n/> extra parameter)) - (/.infix [#and subject n/< parameter n/> extra])))) + (and (bit@= (and (n.< parameter subject) (n.< extra parameter)) + (/.infix [#and subject n.< parameter n.< extra])) + (bit@= (and (n.< parameter subject) (n.> extra parameter)) + (/.infix [#and subject n.< parameter n.> extra])))) )))) |