lib: doc: add TODOs
[majurity.git] / hjugement-protocol / tests / HUnit / FFC.hs
index 2bef3d3feb9eef0c10a3eb876f472b8e4740e62f..ca21e86b3a4d37487c81d43aa887c9ae69bc990b 100644 (file)
@@ -10,7 +10,7 @@ import qualified Data.Text as Text
 
 hunit :: Reifies v Version => Proxy v -> TestTree
 hunit _v = testGroup "FFC"
- [ testGroup "inv"
+ [ testGroup "inverse"
         [ hunitInv weakFFC
         , hunitInv beleniosFFC
         ]
@@ -38,13 +38,12 @@ hunit _v = testGroup "FFC"
 
 hunitInv ::
  forall crypto.
Group crypto => Key crypto =>
ReifyCrypto crypto => Key crypto =>
  crypto -> TestTree
 hunitInv crypto =
        testGroup (Text.unpack $ cryptoName crypto)
         [ testCase "groupGen" $
-                       reify crypto $ \case
-                        (c::Proxy c) | Dict <- groupDict c ->
-                               inv (groupGen :: G crypto c) @?=
+                       reifyCrypto crypto $ \(_c::Proxy c) ->
+                               inverse (groupGen :: G crypto c) @?=
                                        groupGen ^ E (fromJust $ groupOrder (Proxy @c) `minusNaturalMaybe` one)
         ]