1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE OverloadedStrings #-}
3 {-# LANGUAGE TypeApplications #-}
4 module HUnit.Election where
6 import Prelude (Enum(..))
7 import qualified Control.Monad.Trans.State.Strict as S
8 import qualified System.Random as Random
9 import qualified Data.List as List
12 import Protocol.Credential
13 import Protocol.Election
17 hunit = testGroup "Election"
18 [ testGroup "groupGenInverses" $
19 [ testCase "WeakParams" $
20 List.take 10 (groupGenInverses @WeakParams) @?=
21 [groupGen^neg (inE i) | i <- [0..9]]
22 , testCase "BeleniosParams" $
23 List.take 10 (groupGenInverses @BeleniosParams) @?=
24 [groupGen^neg (inE i) | i <- [0..9]]