diff --git a/src/bin/expect_tests/contract_tests.ml b/src/bin/expect_tests/contract_tests.ml index 0ce94f98d..1ba33c139 100644 --- a/src/bin/expect_tests/contract_tests.ml +++ b/src/bin/expect_tests/contract_tests.ml @@ -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"} |}] \ No newline at end of file diff --git a/src/test/contracts/bad_timestamp.ligo b/src/test/contracts/bad_timestamp.ligo new file mode 100644 index 000000000..42850560d --- /dev/null +++ b/src/test/contracts/bad_timestamp.ligo @@ -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) \ No newline at end of file