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