test: curl --fail; use KUDOs
This commit is contained in:
parent
283ad65a10
commit
631b40f6d8
5 changed files with 17 additions and 7 deletions
|
|
@ -48,16 +48,16 @@ let () =
|
|||
let () =
|
||||
let open Amount in
|
||||
let v =
|
||||
make ~sign:(Some Sign_plus) ~currency:"EUR" ~value:(Int64.of_int 25)
|
||||
make ~sign:(Some Sign_plus) ~currency:"KUDO" ~value:(Int64.of_int 25)
|
||||
~fraction:(Int32.of_int 678)
|
||||
|> Result.get_ok
|
||||
in
|
||||
let s = to_string v in
|
||||
let v' = of_string s |> Result.get_ok in
|
||||
assert (v = v');
|
||||
let r = of_string {|~EUR:4.9|} in
|
||||
let r = of_string {|~KUDO:4.9|} in
|
||||
assert (Result.is_error r);
|
||||
let r = of_string {|+EUR:4.99999999999999999999999|} in
|
||||
let r = of_string {|+KUDO:4.99999999999999999999999|} in
|
||||
assert (Result.is_error r);
|
||||
()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue