]> Git — Sourcephile - majurity.git/blob - test/QuickCheck.hs
Add and test rankOfMajorityValue
[majurity.git] / test / QuickCheck.hs
1 module QuickCheck where
2 import Test.Tasty
3
4 import qualified QuickCheck.Merit
5 import qualified QuickCheck.Value
6
7 quickchecks :: TestTree
8 quickchecks =
9 testGroup "QuickCheck"
10 [ QuickCheck.Merit.quickcheck
11 , QuickCheck.Value.quickcheck
12 -- , QuickCheck.Rank.quickcheck
13 {-
14 , testProperty "majorityGauge and majorityValue consistency" $
15 \(SameLength (x@(Merit xs)::Merit G6,y@(Merit ys))) ->
16 not (all (==0) xs || all (==0) ys) ==>
17 case majorityGauge x`compare`majorityGauge y of
18 LT -> majorityValue x < majorityValue y
19 GT -> majorityValue x > majorityValue y
20 EQ -> True
21 -}
22 ]