From 342cc20371fd43a6d6ac93620283072dbdcc26ac Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 24 Dec 2017 18:10:12 -0400 Subject: - Minor refactorings and bug fixes. --- stdlib/test/test/lux/concurrency/frp.lux | 2 +- stdlib/test/test/lux/math.lux | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/concurrency/frp.lux b/stdlib/test/test/lux/concurrency/frp.lux index b24372781..5360dcda2 100644 --- a/stdlib/test/test/lux/concurrency/frp.lux +++ b/stdlib/test/test/lux/concurrency/frp.lux @@ -108,7 +108,7 @@ [f (frp.from-promise (promise.delay +100 i/inc)) a (frp.from-promise (promise.delay +200 12345))] (frp.from-promise (promise.delay +300 (f a)))))) - _ (promise.wait +600) + _ (promise.wait +700) output (promise.future (atom.read output))] (assert "Valid monad." (list/= (list 12346) diff --git a/stdlib/test/test/lux/math.lux b/stdlib/test/test/lux/math.lux index 3dda899c5..fcfe6ab47 100644 --- a/stdlib/test/test/lux/math.lux +++ b/stdlib/test/test/lux/math.lux @@ -82,14 +82,15 @@ [#let [gen-nat (|> r.nat (:: @ map (|>> (n/% +1000) (n/max +1))))] x gen-nat y gen-nat] - ($_ (test "GCD" - (let [gcd (&.gcd x y)] + ($_ seq + (test "GCD" + (let [gcd (&.n/gcd x y)] (and (n/= +0 (n/% gcd x)) (n/= +0 (n/% gcd y)) (n/>= +1 gcd)))) (test "LCM" - (let [lcm (&.lcm x y)] + (let [lcm (&.n/lcm x y)] (and (n/= +0 (n/% x lcm)) (n/= +0 (n/% y lcm)) (n/<= (n/* x y) lcm)))) @@ -110,16 +111,16 @@ (&.infix x))) (test "Can call binary functions." - (n/= (&.gcd y x) - (&.infix [x &.gcd y]))) + (n/= (&.n/gcd y x) + (&.infix [x &.n/gcd y]))) (test "Can call unary functions." (f/= (&.sin theta) (&.infix [&.sin theta]))) (test "Can use regular syntax in the middle of infix code." - (n/= (&.gcd +450 (n/* +3 +9)) - (&.infix [(n/* +3 +9) &.gcd +450]))) + (n/= (&.n/gcd +450 (n/* +3 +9)) + (&.infix [(n/* +3 +9) &.n/gcd +450]))) (test "Can use non-numerical functions/macros as operators." (bool/= (and (n/< y x) (n/< z y)) -- cgit v1.2.3