
On Wed, Jul 18, 2012 at 05:51:51PM -0600, Richard G. wrote:
What's the best way to fix this? I can see two options: - Move the test stanzas to a different Cabal file, allowing users to perform the tests with a little fiddling. - Remove the conditional statements from the test stanzas, which may break compatibility with some compilers and interpreters.
Is there another option?
I think it is preferable to have a test section in the main cabal file. Just an idea: What about having just a single test suite that *depends on the library*? I think that way the test suit would not require any conditionals, but you could not test with different optimization levels anymore. We could then add a Makefile/script that configures, builds and tests with the different optimization levels. This approach also has the advantage, that we are testing exactly the same thing (the library!) that the user is going to use. Cheers, Simon