From 7a9c41f33252e44f36bf667c27739e9afc3085f9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 28 Dec 2016 20:02:14 -0400 Subject: - Fixed a bug with struct auto selection (couldn't handle mixes of vars and expressions). - Added a test of whether the "Functor::map" function can be auto-selected. --- stdlib/test/test/lux/type/auto.lux | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/type/auto.lux b/stdlib/test/test/lux/type/auto.lux index eb25a2371..cb58514bf 100644 --- a/stdlib/test/test/lux/type/auto.lux +++ b/stdlib/test/test/lux/type/auto.lux @@ -7,6 +7,7 @@ lux (lux (codata [io]) (control monad + functor [eq]) (data [text "Text/" Monoid] text/format @@ -23,6 +24,13 @@ (test: "Automatic structure selection" [x R;nat y R;nat] - (assert "Can automatically select first-order structures." - (B/= (:: number;Eq = x y) - (::: = x y)))) + ($_ seq + (assert "Can automatically select first-order structures." + (let [(^open "L/") (list;Eq number;Eq)] + (and (B/= (:: number;Eq = x y) + (::: = x y)) + (L/= (list;n.range +1 +10) + (::: map n.inc (list;n.range +0 +9))) + ))) + + )) -- cgit v1.2.3