1 module QuickCheck.Gauge where
3 import Data.Function (($))
4 import Data.Ord (Ord(..), Ordering(..))
7 import Test.Tasty.QuickCheck
9 import Majority.Judgment
10 import QuickCheck.Merit ()
11 import QuickCheck.Utils
14 quickcheck :: TestTree
17 [ testProperty "majorityGauge and majorityValue consistency" $
18 \(SameLength (x::Merit SchoolGrade, y)) ->
19 case majorityGauge x`compare`majorityGauge y of
20 LT -> majorityValue x < majorityValue y
21 GT -> majorityValue y < majorityValue x