diff options
author | Eduardo Julian | 2016-12-20 23:52:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-12-20 23:52:20 -0400 |
commit | ae9d81b215047553f03a857d04183e9862338c6c (patch) | |
tree | 54919d9135f9b3d9b2d2d807755c4249efa6af37 | |
parent | 48f35a8ac7ae62095e1f92ab70bb42f3a6dd2d50 (diff) |
- Updated tests for lux/data/struct/zipper and lux/math/complex.
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/data/struct/zipper.lux | 12 | ||||
-rw-r--r-- | stdlib/test/test/lux/math/complex.lux | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/test/test/lux/data/struct/zipper.lux b/stdlib/test/test/lux/data/struct/zipper.lux index a1045f44f..8e45b4ef1 100644 --- a/stdlib/test/test/lux/data/struct/zipper.lux +++ b/stdlib/test/test/lux/data/struct/zipper.lux @@ -56,8 +56,8 @@ (let [child (|> zipper &;down)] (and (not (Tree/= sample (&;to-tree child))) (|> child &;parent (default (undefined)) (is zipper)) - (|> child &;up (is zipper)) - (|> child &;root (is zipper)))) + (|> child &;up (is zipper) not) + (|> child &;root (is zipper) not))) (and (&;leaf? zipper) (|> zipper (&;prepend-child new-val) &;branch?))))) @@ -72,7 +72,7 @@ (|> zipper &;down &;right &;value (is mid-val)) (|> zipper &;down &;right &;right &;value (is post-val)) (|> zipper &;down &;rightmost &;leftmost &;value (is pre-val)) - (|> zipper &;down &;right &;left &;value (is mid-val)) + (|> zipper &;down &;right &;left &;value (is pre-val)) (|> zipper &;down &;rightmost &;value (is post-val)))) true))) @@ -91,7 +91,7 @@ (|> zipper &;down &;right &;value (is mid-val)) (|> zipper &;down &;right &;right &;value (is post-val)) (|> zipper &;down &;rightmost &;leftmost &;value (is pre-val)) - (|> zipper &;down &;right &;left &;value (is mid-val)) + (|> zipper &;down &;right &;left &;value (is pre-val)) (|> zipper &;down &;rightmost &;value (is post-val)))) (and (|> zipper (&;insert-left pre-val) (case> (#;Some _) false #;None true)) @@ -105,7 +105,7 @@ (List/= (tree;flatten sample) (loop [zipper (&;from-tree sample)] (if (&;end? zipper) - (list) + (list (&;value zipper)) (#;Cons (&;value zipper) (recur (&;next zipper))))))) @@ -113,7 +113,7 @@ (List/= (list;reverse (tree;flatten sample)) (loop [zipper (to-end (&;from-tree sample))] (if (&;root? zipper) - (list) + (list (&;value zipper)) (#;Cons (&;value zipper) (recur (&;prev zipper))))))) diff --git a/stdlib/test/test/lux/math/complex.lux b/stdlib/test/test/lux/math/complex.lux index d3259ba31..fad780410 100644 --- a/stdlib/test/test/lux/math/complex.lux +++ b/stdlib/test/test/lux/math/complex.lux @@ -37,8 +37,8 @@ (def: gen-dim (R;Random Real) (do R;Monad<Random> - [factor (|> R;nat (:: @ map (n.% +1000))) - measure R;real] + [factor (|> R;nat (:: @ map (|>. (n.% +1000) (n.max +1)))) + measure (|> R;real (R;filter (r.> 0.0)))] (wrap (r.* (|> factor nat-to-int int-to-real) measure)))) |