File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
deku-p/src/core/crypto/tests Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 2525 module Key_data = struct
2626 let public_keys = List. map (fun id -> id.public_key) ids
2727 let compared_public_keys = List. sort Key. compare public_keys
28+
29+ let equality_public_keys =
30+ List. for_all (fun pk -> Key. equal pk pk) public_keys
2831 end
2932
3033 module Key_hash_data = struct
@@ -69,6 +72,12 @@ struct
6972 Alcotest. (check' (list string ))
7073 ~msg: " public key comparison works"
7174 ~expected: Tezos_data. compared_public_keys ~actual: compared_public_keys
75+
76+ let equality () =
77+ Alcotest. (check' bool )
78+ ~msg: " public key equality works"
79+ ~expected: Tezos_data. equality_public_keys
80+ ~actual: Key_data. equality_public_keys
7281 end
7382
7483 module Test_key_hash_data = struct
Original file line number Diff line number Diff line change @@ -88,7 +88,11 @@ let run () =
8888 test_case " compare" `Quick Test_secret_key_data. compare;
8989 test_case " equality" `Quick Test_secret_key_data. equality;
9090 ] );
91- (" Public key" , [ test_case " compared" `Quick Test_key_data. compare ]);
91+ ( " Public key" ,
92+ [
93+ test_case " compared" `Quick Test_key_data. compare;
94+ test_case " equality" `Quick Test_key_data. equality;
95+ ] );
9296 ( " Key hash" ,
9397 [
9498 test_case " compare" `Quick Test_key_hash_data. compare;
You can’t perform that action at this time.
0 commit comments