2014-04-25 05:27:47 +00:00
|
|
|
(defmodule unit-identity-monad-tests
|
|
|
|
(export all)
|
|
|
|
(import
|
|
|
|
(from lfeunit-util
|
|
|
|
(check-failed-assert 2)
|
|
|
|
(check-wrong-assert-exception 2))))
|
|
|
|
|
|
|
|
(include-lib "deps/lfeunit/include/lfeunit-macros.lfe")
|
|
|
|
(include-lib "include/monads.lfe")
|
|
|
|
(include-lib "include/monad-tests.lfe")
|
|
|
|
|
2014-05-13 23:30:46 +00:00
|
|
|
(test-monad 'identity-monad)
|
2014-04-25 05:27:47 +00:00
|
|
|
|
|
|
|
(deftest identity
|
|
|
|
(is-equal 'ok
|
2014-05-13 23:30:46 +00:00
|
|
|
(return 'identity-monad 'ok)))
|
2014-04-25 05:27:47 +00:00
|
|
|
|
|
|
|
(deftest fail-with-error
|
|
|
|
(is-throw #(error value)
|
2014-05-13 23:30:46 +00:00
|
|
|
(fail 'identity-monad 'value)))
|