aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/writer.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-03-22 21:38:04 -0400
committerEduardo Julian2019-03-22 21:38:04 -0400
commita14cef9af5ddd60034152f94adad28352135350d (patch)
treecd0fc5bbd9b99ee308c6d04b9a559167ffc47454 /stdlib/source/test/lux/control/writer.lux
parent36c09baf6d977d6bcb712459325b9c5c3e7589ae (diff)
Ported tests for number-related modules.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/writer.lux15
1 files changed, 7 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index 49610dafe..dfd3b4a10 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -8,9 +8,9 @@
[monad (#+ do)]
{[0 #test]
[/
- [".T" functor (#+ Injection Comparison)]
- [".T" apply]
- [".T" monad]]}]
+ ["$." functor (#+ Injection Comparison)]
+ ["$." apply]
+ ["$." monad]]}]
[data
["." product]
["." text ("#;." equivalence)
@@ -37,14 +37,13 @@
right r.nat]
(<| (_.context (%name (name-of /.Writer)))
($_ _.and
+ ($functor.spec (..injection text.monoid) ..comparison /.functor)
+ ($apply.spec (..injection text.monoid) ..comparison (/.apply text.monoid))
+ ($monad.spec (..injection text.monoid) ..comparison (/.monad text.monoid))
+
(_.test "Can write any value."
(text;= log
(product.left (/.write log))))
-
- (functorT.laws (..injection text.monoid) ..comparison /.functor)
- (applyT.laws (..injection text.monoid) ..comparison (/.apply text.monoid))
- (monadT.laws (..injection text.monoid) ..comparison (/.monad text.monoid))
-
(let [lift (/.lift text.monoid io.monad)
(^open "io;.") io.monad]
(_.test "Can add writer functionality to any monad."