aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test/test/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-07-28 13:36:49 -0400
committerEduardo Julian2018-07-28 13:36:49 -0400
commitdff8878c13610ae8d1207aaabefbecc88cd3911f (patch)
tree11f78712c9f1cafd8be3ec67c5bcb1c738c115be /stdlib/test/test/lux.lux
parentb14102eaa2a80f51f160ba293ec01928dbe683c3 (diff)
Temporary commit to get rid of "+" signs for Nat.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux
index 65f176b87..df0bb8278 100644
--- a/stdlib/test/test/lux.lux
+++ b/stdlib/test/test/lux.lux
@@ -15,9 +15,9 @@
test])
(context: "Value identity."
- (<| (times +100)
+ (<| (times |100)
(do @
- [size (|> r.nat (:: @ map (|>> (n/% +100) (n/max +10))))
+ [size (|> r.nat (:: @ map (|>> (n/% |100) (n/max |10))))
x (r.unicode size)
y (r.unicode size)]
($_ seq
@@ -31,14 +31,14 @@
(do-template [category rand-gen even? odd? = < >]
[(context: (format "[" category "] " "Simple operations.")
- (<| (times +100)
+ (<| (times |100)
(do @
[value rand-gen]
($_ seq
(test (format "[" category "] " "Moving up-down or down-up should result in same value.")
(and (|> value inc dec (= value))
(|> value dec inc (= value))))
- (test (format "[" category "] " "(x+1) > x && (x-1) < x")
+ (test (format "[" category "] " "(x|1) > x && (x-1) < x")
(and (|> value inc (> value))
(|> value dec (< value))))
(test (format "[" category "] " "Every odd/even number is surrounded by two of the other kind.")
@@ -54,7 +54,7 @@
(do-template [category rand-gen = < > <= >= min max]
[(context: (format "[" category "] " "(More) simple operations.")
- (<| (times +100)
+ (<| (times |100)
(do @
[x rand-gen
y rand-gen]
@@ -77,7 +77,7 @@
(do-template [category rand-gen = + - * / <%> > <0> <1> <factor> <cap> <prep>]
[(context: (format "[" category "] " "Additive identity")
- (<| (times +100)
+ (<| (times |100)
(do @
[x rand-gen]
(test ""
@@ -85,7 +85,7 @@
(|> x (- <0>) (= x)))))))
(context: (format "[" category "] " "Addition & Substraction")
- (<| (times +100)
+ (<| (times |100)
(do @
[x (:: @ map <prep> rand-gen)
y (:: @ map <prep> rand-gen)
@@ -96,7 +96,7 @@
(|> x (+ y) (- y) (= x)))))))
(context: (format "[" category "] " "Multiplicative identity")
- (<| (times +100)
+ (<| (times |100)
(do @
[x rand-gen]
(test ""
@@ -108,7 +108,7 @@
(|> x (/ <1>) (= x))))))))
(context: (format "[" category "] " "Multiplication & Division")
- (<| (times +100)
+ (<| (times |100)
(do @
[x (:: @ map <cap> rand-gen)
y (|> rand-gen
@@ -125,7 +125,7 @@
(|> x' (/ y) (* y) (= x'))))
))))]
- ["Nat" r.nat n/= n/+ n/- n/* n// n/% n/> +0 +1 +1_000_000 (n/% +1_000) id]
+ ["Nat" r.nat n/= n/+ n/- n/* n// n/% n/> |0 |1 |1_000_000 (n/% |1_000) id]
["Int" r.int i/= i/+ i/- i/* i// i/% i/> 0 1 1_000_000 (i/% 1_000) id]
["Frac" r.frac f/= f/+ f/- f/* f// f/% f/> 0.0 1.0 1_000_000.0 id math.floor]
["Rev" r.rev r/= r/+ r/- r/* r// r/% r/> .0 (.rev -1) (.rev -1) id id]
@@ -134,11 +134,11 @@
(def: frac-rev
(r.Random Rev)
(|> r.rev
- (:: r.Functor<Random> map (|>> (i64.left-shift +11) (i64.logical-right-shift +11)))))
+ (:: r.Functor<Random> map (|>> (i64.left-shift |11) (i64.logical-right-shift |11)))))
(do-template [category rand-gen -> <- = <cap>]
[(context: (format "[" category "] " "Numeric conversions")
- (<| (times +100)
+ (<| (times |100)
(do @
[value rand-gen
#let [value (<cap> value)]]
@@ -146,7 +146,7 @@
(|> value -> <- (= value))))))]
["Int->Nat" r.int .nat .int i/= (i/% 1_000_000)]
- ["Nat->Int" r.nat .int .nat n/= (n/% +1_000_000)]
+ ["Nat->Int" r.nat .int .nat n/= (n/% |1_000_000)]
["Int->Frac" r.int int-to-frac frac-to-int i/= (i/% 1_000_000)]
["Frac->Int" r.frac frac-to-int int-to-frac f/= math.floor]
["Rev->Frac" frac-rev rev-to-frac frac-to-rev r/= id]
@@ -189,7 +189,7 @@
(i/+ (i/* x x) (i/* y y)))
(context: "Templates."
- (<| (times +100)
+ (<| (times |100)
(do @
[x r.int
y r.int]