Skip to content

Commit

Permalink
move from test-framework to tasty
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenthz committed Mar 26, 2016
1 parent 31fddf1 commit 5d139b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
8 changes: 3 additions & 5 deletions language-java.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ Test-Suite test-java-parse
Main-is: Tests.hs
Build-Depends: base >= 3 && < 5
, mtl
, QuickCheck >= 2
, HUnit
, test-framework
, test-framework-quickcheck2
, test-framework-hunit
, tasty
, tasty-quickcheck
, tasty-hunit
, language-java
, filepath
, directory
Expand Down
12 changes: 4 additions & 8 deletions tests/Tests.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{-# LANGUAGE ScopedTypeVariables #-}
module Main where

import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit (assertBool)

import Test.QuickCheck
import Test.QuickCheck.Test
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit

import System.Directory
import System.FilePath
Expand Down Expand Up @@ -65,7 +61,7 @@ main = do
allGoodJavas <- getAllJavaPaths (testJavaDirectory </> "good")
allBadJavas <- getAllJavaPaths (testJavaDirectory </> "bad")

defaultMain
defaultMain $ testGroup "java"
[ testGroup "parsing unit good" (map (toTestCase True) allGoodJavas)
, testGroup "parsing unit bad" (map (toTestCase False) allBadJavas)
, testProperty "parsing.generating==id" (\g -> case parser compilationUnit (show $ pretty g) of
Expand Down

0 comments on commit 5d139b4

Please sign in to comment.