This commit is contained in:
parent
4c511efae9
commit
747c1b4277
3 changed files with 27 additions and 6 deletions
|
|
@ -15,11 +15,13 @@ let () =
|
|||
in
|
||||
()
|
||||
|
||||
let get_ok = function Error e -> failwith e | Ok v -> v
|
||||
|
||||
let () =
|
||||
let open Api in
|
||||
let check jsont s =
|
||||
let encode v = encode jsont v |> Result.get_ok in
|
||||
let decode v = decode jsont v |> Result.get_ok in
|
||||
let encode v = encode jsont v |> get_ok in
|
||||
let decode v = decode jsont v |> get_ok in
|
||||
let ts = decode s in
|
||||
let s' = encode ts in
|
||||
let ts' = decode s' in
|
||||
|
|
@ -39,9 +41,9 @@ let () =
|
|||
(*
|
||||
check DenominationKey.jsont
|
||||
{|{"cipher": "RSA", "age_mask": 18, "rsa_pub": "agagouh"}|};
|
||||
*)
|
||||
check DenominationKey.jsont
|
||||
{|{"cipher": "CS", "age_mask": 18, "cs_pub": "ouhagag"}|};
|
||||
*)
|
||||
()
|
||||
|
||||
let () =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue