calrissian/test/unit-calrissian-identity-monad-tests.lfe
2015-05-21 17:31:11 -05:00

17 lines
No EOL
444 B
Text

(defmodule unit-calrissian-identity-monad-tests
(behaviour ltest-unit)
(export all))
(include-lib "ltest/include/ltest-macros.lfe")
(include-lib "calrissian/include/monads.lfe")
(include-lib "calrissian/include/monad-tests.lfe")
(test-monad (monad 'identity))
(deftest identity
(is-equal 'ok
(return (monad 'identity) 'ok)))
(deftest fail-with-error
(is-throw #(error value)
(fail (monad 'identity) 'value)))