File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020--------------------------------------------------------------------------------
2121
2222-- | QuickCheck property tests for DList.
23- module DListProperties (test ) where
23+ module DListProperties (properties ) where
2424
2525--------------------------------------------------------------------------------
2626
@@ -183,6 +183,3 @@ properties =
183183 (" Semigroup stimes" , property prop_Semigroup_stimes)
184184#endif
185185 ]
186-
187- test :: IO ()
188- test = quickCheckLabeledProperties properties
Original file line number Diff line number Diff line change 88--------------------------------------------------------------------------------
99
1010-- | QuickCheck property tests for DNonEmpty.
11- module DNonEmptyProperties (test ) where
11+ module DNonEmptyProperties (properties ) where
1212
1313--------------------------------------------------------------------------------
1414
@@ -104,6 +104,3 @@ properties =
104104 (" fromList" , property prop_fromList),
105105 (" Semigroup <>" , property prop_Semigroup_append)
106106 ]
107-
108- test :: IO ()
109- test = quickCheckLabeledProperties properties
Original file line number Diff line number Diff line change @@ -18,14 +18,20 @@ import qualified DListProperties
1818import qualified DNonEmptyProperties
1919#endif
2020import qualified OverloadedStrings
21+ import QuickCheckUtil (quickCheckLabeledProperties )
22+ import Control.Monad (unless )
23+ import Test.QuickCheck (isSuccess )
24+ import System.Exit (exitFailure )
2125
2226--------------------------------------------------------------------------------
2327
2428main :: IO ()
2529main = do
26- DListProperties. test
27- -- CPP: GHC >= 8 for DNonEmpty
30+ OverloadedStrings. test
31+ result <- quickCheckLabeledProperties $
32+ DListProperties. properties
33+ -- CPP: GHC >= 8 for DNonEmpty
2834#if __GLASGOW_HASKELL__ >= 800
29- DNonEmptyProperties. test
35+ ++ DNonEmptyProperties. properties
3036#endif
31- OverloadedStrings. test
37+ unless (isSuccess result) exitFailure
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ eqOn c f g x = c x ==> f x == g x
3737
3838--------------------------------------------------------------------------------
3939
40- quickCheckLabeledProperties :: [(String , Property )] -> IO ()
41- quickCheckLabeledProperties = quickCheck . conjoin . map (uncurry label)
40+ quickCheckLabeledProperties :: [(String , Property )] -> IO Result
41+ quickCheckLabeledProperties = quickCheckResult . conjoin . map (uncurry label)
4242
4343--------------------------------------------------------------------------------
4444
You can’t perform that action at this time.
0 commit comments