<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">How do folks like to package up QuickCheck tests for their libraries?&nbsp; In the main library?&nbsp; As a separate repo &amp; package?&nbsp; Same repo &amp; separate package?&nbsp; Keeping tests with the tested code allows testing of non-exported functionality, but can add quite a lot of clutter.<br>


</div></blockquote></div><div><br>I have QuickCheck properties plus HUnit tests, but I think the question is the same. For me, it&#39;s in the same repository and shipped with the package source. I think that if you ship source (even via Hackage), you should also ship tests. So, if somebody wants to modify the source, they can run the tests. And making it convenient to test is very important, so I have &quot;cabal test&quot; (or &quot;runhaskell Setup.hs test&quot; without cabal-install) configured to run the tests. I don&#39;t think tests should (in general) be part of the user-visible API, so I have them external to the module hierarchy.<br>

<br>Testing non-exported functionality without exporting the test interface seems difficult in general. Is there a way to hide part of a module interface with Cabal? Then, you could have a &#39;test&#39; function exported from each module for testing but hidden for release.<br>

<br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">My current leaning is to split a package &quot;foo&quot; into packages &quot;foo&quot; and &quot;foo-test&quot;<br>

</div></blockquote><div>&nbsp;</div></div></div>What benefit does this provide?<br><br>Thanks,<br>Sean<br></div>
</div></div>