aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2016-12-28 20:02:14 -0400
committerEduardo Julian2016-12-28 20:02:14 -0400
commit7a9c41f33252e44f36bf667c27739e9afc3085f9 (patch)
tree691729e6cb32986bbf0b7d67245537f709f9dba6 /stdlib/test
parent4785f68c8b26775a07831ec8c92897c7235d654a (diff)
- 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.
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/type/auto.lux14
1 files changed, 11 insertions, 3 deletions
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>]
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<Nat> = x y)
- (::: = x y))))
+ ($_ seq
+ (assert "Can automatically select first-order structures."
+ (let [(^open "L/") (list;Eq<List> number;Eq<Nat>)]
+ (and (B/= (:: number;Eq<Nat> = x y)
+ (::: = x y))
+ (L/= (list;n.range +1 +10)
+ (::: map n.inc (list;n.range +0 +9)))
+ )))
+
+ ))