negative timestamp literal test

This commit is contained in:
Lesenechal Remi 2020-01-03 17:46:31 +01:00
parent c805a27b99
commit 1a2a29bc03
2 changed files with 11 additions and 0 deletions

View File

@ -936,3 +936,7 @@ let%expect_test _ =
let%expect_test _ =
run_ligo_bad [ "compile-contract" ; contract "bad_address_format.religo" ; "main" ] ;
[%expect {| ligo: in file "bad_address_format.religo", line 2, characters 25-47. Badly formatted address "KT1badaddr": {"location":"in file \"bad_address_format.religo\", line 2, characters 25-47"} |}]
let%expect_test _ =
run_ligo_bad [ "compile-contract" ; contract "bad_timestamp.ligo" ; "main" ] ;
[%expect {| ligo: in file "bad_timestamp.ligo", line 5, characters 29-43. Badly formatted timestamp "badtimestamp": {"location":"in file \"bad_timestamp.ligo\", line 5, characters 29-43"} |}]

View File

@ -0,0 +1,7 @@
type storage_ is timestamp
function main(const p : unit; const s : storage_) : list(operation) * storage_ is
block {
var toto : timestamp := ("badtimestamp" : timestamp);
}
with ((nil: list(operation)), toto)