calrissian/test/unit-calrissian-identity-monad-tests.lfe

17 lines
444 B
Text
Raw Permalink Normal View History

2014-07-10 01:19:14 +00:00
(defmodule unit-calrissian-identity-monad-tests
2015-05-21 22:31:11 +00:00
(behaviour ltest-unit)
(export all))
2014-04-25 05:27:47 +00:00
2015-05-21 22:31:11 +00:00
(include-lib "ltest/include/ltest-macros.lfe")
(include-lib "calrissian/include/monads.lfe")
(include-lib "calrissian/include/monad-tests.lfe")
2014-04-25 05:27:47 +00:00
2014-07-10 02:28:06 +00:00
(test-monad (monad 'identity))
2014-04-25 05:27:47 +00:00
(deftest identity
(is-equal 'ok
2014-07-10 02:28:06 +00:00
(return (monad 'identity) 'ok)))
2014-04-25 05:27:47 +00:00
(deftest fail-with-error
(is-throw #(error value)
2014-07-10 02:28:06 +00:00
(fail (monad 'identity) 'value)))