File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
deku-p/src/core/crypto/tests Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ struct
8787 List. map2
8888 (fun key signatures -> check_sig key signatures)
8989 public_keys b58_to_signatures
90+
91+ let compare_signatures =
92+ List. sort compare
93+ (List. map (fun (signature , _ ) -> signature) (List. flatten signatures))
9094 end
9195
9296 module Test_secret_key_data = struct
@@ -194,5 +198,14 @@ struct
194198 ~msg: " verified post conversion signatures are equal"
195199 ~expected: Tezos_data. verified_after_conversion
196200 ~actual: Signature_data. verified_after_conversion
201+
202+ let compare () =
203+ let compare_signatures =
204+ List. map helper_string_signatures Signature_data. compare_signatures
205+ |> String. concat " "
206+ in
207+ Alcotest. (check' string )
208+ ~msg: " signature comparison works"
209+ ~expected: Tezos_data. compare_signatures ~actual: compare_signatures
197210 end
198211end
Original file line number Diff line number Diff line change @@ -106,5 +106,6 @@ let run () =
106106 Test_signature_data. verified_normal_signatures;
107107 test_case " verified after conversion signatures" `Quick
108108 Test_signature_data. verified_after_conversion;
109+ test_case " compare" `Quick Test_signature_data. compare;
109110 ] );
110111 ]
You can’t perform that action at this time.
0 commit comments