summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests/quickCheckCompat.h
blob: 714587b1d9cebafdcf5b9120deb6435f94b3cbd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef MIN_VERSION_QuickCheck
#define MIN_VERSION_QuickCheck(A,B,C) 1
#endif

#if MIN_VERSION_QuickCheck(2,0,0)
import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector
                      ,sized,classify,Testable,Property

                      ,quickCheckWith,maxSize,stdArgs,shrink)

#else
import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector
                      ,sized,classify,Testable,Property

                      ,check,configSize,defaultConfig,trivial)
#endif



#if MIN_VERSION_QuickCheck(2,0,0)
trivial :: Testable a => Bool -> a -> Property
trivial = (`classify` "trivial")
#else
#endif


-- define qCheck, which used to be in Tests.hs
#if MIN_VERSION_QuickCheck(2,0,0)
qCheck n = quickCheckWith stdArgs {maxSize = n}
#else
qCheck n = check defaultConfig {configSize = const n}
#endif