Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate testing/Main.hs to Tasty testing framework #8

Merged
merged 1 commit into from
May 31, 2015

Conversation

michalt
Copy link
Contributor

@michalt michalt commented May 31, 2015

Hoopl's testsuite seems to be pretty tiny (8 goldens tests). So this is basically a first step in extending it. Since I'd also like to add some QuickCheck tests, I went with using Tasty - this should make it easy to add both new goldens or unit test as well as QuickCheck ones.

@hvr
Copy link
Member

hvr commented May 31, 2015

The only frustrating problem with tasty is that it sadly doesn't support GHC < 7.4

compare e.g.

http://matrix.hackage.haskell.org/package/tasty

vs.

http://matrix.hackage.haskell.org/package/test-framework

Personally, I tend to avoid using tasty for packages which officially supports GHC < 7.4 (which hoopl does). See also http://matrix.hackage.haskell.org/package/hoopl

@michalt
Copy link
Contributor Author

michalt commented May 31, 2015

Oh, I didn't know that tasty doesn't support GHC <7.4 and that Hoopl does. I'll change the PR to use test-framework. Thanks!

This is (hopefully) a first step to cleaning up and extending
Hoopl's testsuite. In the future I'd like to add some QuickCheck
tests, so I wanted to use a testing framework that would make
it easy to handle both HUnit and QuickCheck tests.

Note that we considered using tasty (instead of test-framework),
but it doesn't support GHC <7.4, which Hoopl does support.
@michalt
Copy link
Contributor Author

michalt commented May 31, 2015

Moved to test-framework.

@jstolarek
Copy link

The only frustrating problem with tasty is that it sadly doesn't support GHC < 7.4

How much that problem does really affect the users in the wild? There have been three stable releases since GHC 7.4. And with test-framework being abandoned tasty is becoming a standard. I believe the choice of testing framework essentially affects package developers and package builders. That said, does any distribution still maintain GHC 7.4 and at the same time uses upstream Hoopl?

@hvr
Copy link
Member

hvr commented May 31, 2015

@jstolarek this affects mostly the TravisCI build; if you go w/ tasty that means that hoopl can only be tested if they compile w/ GHC 7.0/7.2, but building & running the test-suite would have to be inhibited for those two GHC versions in the build-matrix. Or were you planning to officially drop support for GHC 7.0/7.2 in hoopl by setting build-depends: base>=4.5?

@jstolarek
Copy link

this affects mostly the TravisCI build

Travis build of GHC, I presume?

I treat Hoopl as a Haskell library and as such it shouldn't be a major problem to drop support for very old versions of GHC. But at the moment I don't see how this affects GHC in any way - older versions of GHC were released with older versions of Hoopl and obviously these won't be affected.

@hvr
Copy link
Member

hvr commented May 31, 2015

No, the Travis build of hoopl at https://travis-ci.org/haskell/hoopl which makes sure that hoopl keeps building on all GHC 7.* major versions! :-)

(If it wasn't clear from my comments, I'm considering hoopl a library independent of GHC, i.e. I'm ignoring that GHC actually ships w/ hoopl, and the reason I configured the TravisCI build-matrix back then the way it is currently setup testing hoopl keeps building w/ all GHC 7 versions)

@jstolarek
Copy link

Oh, that. I personally wouldn't have any problems with dropping support for these old GHC versions, but that's not for me to decide. Perhaps we can use test-framework for now and if it gives us problems then consider switching to tasty?

@mlite
Copy link
Contributor

mlite commented May 31, 2015

I used QuickCheck without depending on tasty. Let's add more tests first then we can debate whether it's worth adding more dependency to hoopl. I prefer to keeping the dependency of hoopl to the minimum.

@mlite mlite merged commit 75d9163 into haskell:master May 31, 2015
@mlite
Copy link
Contributor

mlite commented May 31, 2015

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants