clean up
This commit is contained in:
parent
6bf2771f1c
commit
eddc8127a1
11 changed files with 40 additions and 165 deletions
21
test/test.ml
21
test/test.ml
|
|
@ -97,19 +97,14 @@ let () =
|
|||
|
||||
()
|
||||
|
||||
(*
|
||||
|
||||
let () =
|
||||
let open Binary_formats.WithdrawConfirmationPS in
|
||||
let str64 = String.init 64 (fun i -> Char.unsafe_chr (i + 1)) in
|
||||
let dummy_t = { h_planchets= { hash= str64 }; noreveal_index= 0_l } in
|
||||
let size = Bin.size_of_value bin dummy_t |> Option.get in
|
||||
assert (size = 76);
|
||||
let round_trip s =
|
||||
let s' = s |> B32.encode |> B32.decode |> Result.get_ok in
|
||||
assert (s = s')
|
||||
in
|
||||
let s = String.init 0xff Char.chr in
|
||||
round_trip s;
|
||||
let s_l = List.init 0x0f (fun i -> String.init i Char.chr) in
|
||||
List.iter round_trip s_l;
|
||||
|
||||
(* for cmp test with signatures.c output *)
|
||||
(*
|
||||
let raw_str = Bin.to_string bin dummy_t in
|
||||
Printf.printf "%s" raw_str;
|
||||
*)
|
||||
()
|
||||
*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue