1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE OverloadedStrings #-}
3 module HUnit.Arithmetic where
5 import Protocol.Arithmetic
9 hunit = testGroup "Arithmetic"
11 [ testGroup "WeakParams"
12 [ testCase "groupGen" $
13 inv (groupGen @WeakParams) @?=
14 groupGen ^ E (groupOrder @WeakParams + neg one)
16 , testGroup "BeleniosParams"
17 [ testCase "groupGen" $
18 inv (groupGen @BeleniosParams) @?=
19 groupGen ^ E (groupOrder @BeleniosParams + neg one)
23 [ testGroup "WeakParams"
24 [ testCase "[groupGen]" $
25 hash "start" [groupGen @WeakParams] @?= inE 80
26 , testCase "[groupGen, groupGen]" $
27 hash "start" [groupGen @WeakParams, groupGen] @?= inE 117
29 , testGroup "BeleniosParams"
30 [ testCase "[groupGen]" $
31 hash "start" [groupGen @BeleniosParams] @?=
32 inE 1115773133278002110129249165266
33 , testCase "[groupGen, groupGen]" $
34 hash "start" [groupGen @BeleniosParams, groupGen] @?=
35 inE 1237765159213600087872608890753