[Haskell-cafe] Test Framework, HUnit
Roman Cheplyaka
roma at ro-che.info
Wed Oct 22 21:36:35 UTC 2014
On 23/10/14 00:01, spopejoy wrote:
> Hmm ... Tasty's cool but there's some funny business:
>
> * What's up with "Exception: ExitSuccess"? Why does a test framework need to
> throw an exception to exit?
It is the standard way for Haskell programs to exit. See System.Exit
(http://bit.ly/1vOHwTC).
I guess you're seeing this text because you're running the test suite
from ghci. When you run it as a compiled executable, you don't see this
message.
> * Why does Tasty rewrite HUnit?
To quote the changelog (http://bit.ly/1vOIE9W), this is motivated by:
* efficiency (one less package to compile/install)
* reliability (if something happens with HUnit, we won't be affected)
> They left out some nice features, like the
> (~:) operator, allowing quick suite authoring a la 'test = "foo" ~: [ bar
> @?= baz]' ...
You should be able to define this operator for Tasty quite easily.
Even before the dependency on HUnit was dropped, that HUnit operator
wouldn't work because Tasty's test are not the same as HUnit tests
(though both build upon HUnit's assertions). Nor does it work with
test-framework-hunit, if I'm not mistaken.
Roman
More information about the Haskell-Cafe
mailing list