File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
deku-p/src/core/crypto/tests Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ struct
9191 let compare_signatures =
9292 List. sort compare
9393 (List. map (fun (signature , _ ) -> signature) (List. flatten signatures))
94+
95+ let equality_signatures =
96+ List. for_all
97+ (fun (signature , _ ) -> Signature. equal signature signature)
98+ (List. flatten signatures)
9499 end
95100
96101 module Test_secret_key_data = struct
@@ -207,5 +212,10 @@ struct
207212 Alcotest. (check' string )
208213 ~msg: " signature comparison works"
209214 ~expected: Tezos_data. compare_signatures ~actual: compare_signatures
215+
216+ let equality () =
217+ Alcotest. (check' bool )
218+ ~msg: " signature equality works" ~expected: Tezos_data. equality_signatures
219+ ~actual: Signature_data. equality_signatures
210220 end
211221end
Original file line number Diff line number Diff line change @@ -107,5 +107,6 @@ let run () =
107107 test_case " verified after conversion signatures" `Quick
108108 Test_signature_data. verified_after_conversion;
109109 test_case " compare" `Quick Test_signature_data. compare;
110+ test_case " equality" `Quick Test_signature_data. equality;
110111 ] );
111112 ]
You can’t perform that action at this time.
0 commit comments