1 {-# LANGUAGE OverloadedStrings #-}
4 import GHC.Natural (minusNaturalMaybe)
5 import Data.Maybe (fromJust)
6 import Test.Tasty.HUnit
11 hunit = testGroup "FFC"
13 [ testGroup "WeakParams"
14 [ testCase "groupGen" $
15 reify weakFFC $ \(Proxy::Proxy c) ->
17 groupGen ^ E (fromJust $ groupOrder @c `minusNaturalMaybe` one)
19 , testGroup "BeleniosParams"
20 [ testCase "groupGen" $
21 reify beleniosFFC $ \(Proxy::Proxy c) ->
23 groupGen ^ E (fromJust $ groupOrder @c `minusNaturalMaybe` one)
27 [ testGroup "WeakParams" $
28 reify weakFFC $ \(Proxy::Proxy c) ->
29 [ testCase "[groupGen]" $
30 hash "start" [groupGen @c] @?=
32 , testCase "[groupGen, groupGen]" $
33 hash "start" [groupGen @c, groupGen] @?=
36 , testGroup "BeleniosParams" $
37 reify beleniosFFC $ \(Proxy::Proxy c) ->
38 [ testCase "[groupGen]" $
39 hash "start" [groupGen @c] @?=
40 fromNatural 75778590284190557660612328423573274641033882642784670156837892421285248292707
41 , testCase "[groupGen, groupGen]" $
42 hash "start" [groupGen @c, groupGen] @?=
43 fromNatural 28798937720387703653439047952832768487958170248947132321730024269734141660223