git.iko.soy/typeable/attoparsec
on master help sign in
Move from test-framework to tasty

It appears that test-framework's --maximum-generated-tests options is currently broken; it was easier to just move to tasty than work out what was wrong.

commitf13c4cb787fbcd423682472968ce950acb413321 authorBen Gamari <ben@smart-cactus.org> dateFri 8 Apr 2016, 12:47 (11 years ago) parente130c39
8 files changed+22−22
attoparsec.cabal+2−2 tests/QC.hs+2−2 tests/QC/Buffer.hs+3−3 tests/QC/ByteString.hs+3−3 tests/QC/Combinator.hs+3−3 tests/QC/Simple.hs+3−3 tests/QC/Text.hs+3−3 tests/QC/Text/FastSet.hs+3−3
attoparsec.cabal+2−2
@@ -105,8 +105,8 @@ test-suite tests
105105 QuickCheck >= 2.7,
106106 quickcheck-unicode,
107107 scientific,
108− test-framework >= 0.8.0.2,
109− test-framework-quickcheck2 >= 0.3.0.3,
108+ tasty >= 0.11,
109+ tasty-quickcheck >= 0.8,
110110 text,
111111 transformers,
112112 vector
tests/QC.hs+2−2
@@ -6,11 +6,11 @@ import qualified QC.ByteString as ByteString
66import qualified QC.Combinator as Combinator
77import qualified QC.Simple as Simple
88import qualified QC.Text as Text
9−import Test.Framework (defaultMain, testGroup)
9+import Test.Tasty (defaultMain, testGroup)
1010
1111main = defaultMain tests
1212
13−tests = [
13+tests = testGroup "tests" [
1414 testGroup "bs" ByteString.tests
1515 , testGroup "buf" Buffer.tests
1616 , testGroup "combinator" Combinator.tests
tests/QC/Buffer.hs+3−3
@@ -8,8 +8,8 @@ import Control.Applicative ((<$>))
88import Data.Monoid (Monoid(mconcat))
99#endif
1010import QC.Common ()
11−import Test.Framework (Test)
12−import Test.Framework.Providers.QuickCheck2 (testProperty)
11+import Test.Tasty (TestTree)
12+import Test.Tasty.QuickCheck (testProperty)
1313import Test.QuickCheck
1414import qualified Data.Attoparsec.ByteString.Buffer as BB
1515import qualified Data.Attoparsec.Text.Buffer as BT
@@ -82,7 +82,7 @@ t_dropWord16 (BP _ts t buf) = do
8282 i <- choose (0, T.lengthWord16 t)
8383 return $ T.dropWord16 i t === BT.dropWord16 i buf
8484
85−tests :: [Test]
85+tests :: [TestTree]
8686tests = [
8787 testProperty "b_unbuffer" b_unbuffer
8888 , testProperty "t_unbuffer" t_unbuffer
tests/QC/ByteString.hs+3−3
@@ -9,8 +9,8 @@ import Data.Int (Int64)
99import Data.Word (Word8)
1010import Prelude hiding (take, takeWhile)
1111import QC.Common (ASCII(..), liftOp, parseBS, toStrictBS)
12−import Test.Framework (Test)
13−import Test.Framework.Providers.QuickCheck2 (testProperty)
12+import Test.Tasty (TestTree)
13+import Test.Tasty.QuickCheck (testProperty)
1414import Test.QuickCheck
1515import qualified Data.Attoparsec.ByteString as P
1616import qualified Data.Attoparsec.ByteString.Char8 as P8
@@ -155,7 +155,7 @@ nonmembers :: [Word8] -> [Word8] -> Property
155155nonmembers s s' = property . not . any (`S.memberWord8` set) $ filter (not . (`elem` s)) s'
156156 where set = S.fromList s
157157
158−tests :: [Test]
158+tests :: [TestTree]
159159tests = [
160160 testProperty "anyWord8" anyWord8
161161 , testProperty "endOfInput" endOfInput
tests/QC/Combinator.hs+3−3
@@ -8,8 +8,8 @@ import Control.Applicative ((<*>), (<$>), (<*), (*>))
88import Data.Maybe (fromJust, isJust)
99import Data.Word (Word8)
1010import QC.Common (Repack, parseBS, repackBS, toLazyBS)
11−import Test.Framework (Test)
12−import Test.Framework.Providers.QuickCheck2 (testProperty)
11+import Test.Tasty (TestTree)
12+import Test.Tasty.QuickCheck (testProperty)
1313import Test.QuickCheck
1414import qualified Data.Attoparsec.ByteString.Char8 as P
1515import qualified Data.Attoparsec.Combinator as C
@@ -43,7 +43,7 @@ match n (NonNegative x) (NonNegative y) rs =
4343 B8.replicate x 'x', B8.pack (show n), B8.replicate y 'y'
4444 ]
4545
46−tests :: [Test]
46+tests :: [TestTree]
4747tests = [
4848 testProperty "choice" choice
4949 , testProperty "count" count
tests/QC/Simple.hs+3−3
@@ -10,8 +10,8 @@ import Data.ByteString (ByteString)
1010import Data.List (foldl')
1111import Data.Maybe (fromMaybe)
1212import QC.Rechunked (rechunkBS)
13−import Test.Framework (Test)
14−import Test.Framework.Providers.QuickCheck2 (testProperty)
13+import Test.Tasty (TestTree)
14+import Test.Tasty.QuickCheck (testProperty)
1515import Test.QuickCheck (Property, counterexample, forAll)
1616import qualified Data.Attoparsec.ByteString.Char8 as A
1717
@@ -31,7 +31,7 @@ parse :: A.Parser r -> [ByteString] -> A.Result r
3131parse p (x:xs) = foldl' A.feed (A.parse p x) xs
3232parse p [] = A.parse p ""
3333
34−tests :: [Test]
34+tests :: [TestTree]
3535tests = [
3636 testProperty "issue75" t_issue75
3737 ]
tests/QC/Text.hs+3−3
@@ -9,8 +9,8 @@ import Data.Int (Int64)
99import Prelude hiding (take, takeWhile)
1010import QC.Common (liftOp, parseT)
1111import qualified QC.Text.FastSet as FastSet
12−import Test.Framework (Test, testGroup)
13−import Test.Framework.Providers.QuickCheck2 (testProperty)
12+import Test.Tasty (TestTree, testGroup)
13+import Test.Tasty.QuickCheck (testProperty)
1414import Test.QuickCheck
1515import qualified Data.Attoparsec.Text as P
1616import qualified Data.Attoparsec.Text.Lazy as PL
@@ -161,7 +161,7 @@ nonmembers :: String -> String -> Property
161161nonmembers s s' = property . not . any (`S.member` set) $ filter (not . (`elem` s)) s'
162162 where set = S.fromList s
163163
164−tests :: [Test]
164+tests :: [TestTree]
165165tests = [
166166 testProperty "anyChar" anyChar
167167 , testProperty "asciiCI" asciiCI
tests/QC/Text/FastSet.hs+3−3
@@ -1,7 +1,7 @@
11module QC.Text.FastSet where
22
3−import Test.Framework (Test)
4−import Test.Framework.Providers.QuickCheck2 (testProperty)
3+import Test.Tasty (TestTree)
4+import Test.Tasty.QuickCheck (testProperty)
55import Test.QuickCheck
66import qualified Data.Attoparsec.Text.FastSet as FastSet
77
@@ -11,5 +11,5 @@ membershipCorrect members others =
1111 correct c = (c `FastSet.member` fs) == (c `elem` members)
1212 in property $ all correct (members ++ others)
1313
14−tests :: [Test]
14+tests :: [TestTree]
1515tests = [ testProperty "membership is correct" membershipCorrect ]