diff --git a/src/bin/expect_tests/typer_error_tests.ml b/src/bin/expect_tests/typer_error_tests.ml index 6c1dc3cb1..7cc8821fd 100644 --- a/src/bin/expect_tests/typer_error_tests.ml +++ b/src/bin/expect_tests/typer_error_tests.ml @@ -1,15 +1,15 @@ open Cli_expect let%expect_test _ = - run_ligo_bad [ "compile-contract" ; "../../test/contracts/error_typer_1.mligo" ; "foo" ] ; + run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_typer_1.mligo" ; "foo" ] ; [%expect {| ligo: in file "error_typer_1.mligo", line 3, characters 19-27. different type constructors: Expected these two constant type constructors to be the same, but they're different {"a":"string","b":"int"} |} ] ; - run_ligo_bad [ "compile-contract" ; "../../test/contracts/error_typer_2.mligo" ; "foo" ] ; + run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_typer_2.mligo" ; "foo" ] ; [%expect {| ligo: in file "error_typer_2.mligo", line 3, characters 24-39. different type constructors: Expected these two n-ary type constructors to be the same, but they're different {"a":"(TO_list(string))","b":"(TO_option(int))"} |} ] ; - run_ligo_bad [ "compile-contract" ; "../../test/contracts/error_typer_3.mligo" ; "foo" ] ; + run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_typer_3.mligo" ; "foo" ] ; [%expect {| ligo: in file "error_typer_3.mligo", line 3, characters 34-53. tuples have different sizes: Expected these two types to be the same, but they're different (both are tuples, but with a different number of arguments) {"a":"tuple[int , string , bool]","b":"tuple[int , string]"} |} ] ; - run_ligo_bad [ "compile-contract" ; "../../test/contracts/error_typer_4.mligo" ; "foo" ] ; + run_ligo_bad [ "compile-contract" ; "../../test/contracts/negative/error_typer_4.mligo" ; "foo" ] ; [%expect {| ligo: in file "error_typer_4.mligo", line 4, characters 17-56. different keys in record: {"key_a":"d","key_b":"c"} |} ] ; diff --git a/src/test/contracts/negative/README b/src/test/contracts/negative/README new file mode 100644 index 000000000..7e17f7aea --- /dev/null +++ b/src/test/contracts/negative/README @@ -0,0 +1 @@ +This folder contains contracts for negative tests: contracts that are expected to fail (parse error, type error and so on). diff --git a/src/test/contracts/error_typer_1.mligo b/src/test/contracts/negative/error_typer_1.mligo similarity index 100% rename from src/test/contracts/error_typer_1.mligo rename to src/test/contracts/negative/error_typer_1.mligo diff --git a/src/test/contracts/error_typer_2.mligo b/src/test/contracts/negative/error_typer_2.mligo similarity index 100% rename from src/test/contracts/error_typer_2.mligo rename to src/test/contracts/negative/error_typer_2.mligo diff --git a/src/test/contracts/error_typer_3.mligo b/src/test/contracts/negative/error_typer_3.mligo similarity index 100% rename from src/test/contracts/error_typer_3.mligo rename to src/test/contracts/negative/error_typer_3.mligo diff --git a/src/test/contracts/error_typer_4.mligo b/src/test/contracts/negative/error_typer_4.mligo similarity index 100% rename from src/test/contracts/error_typer_4.mligo rename to src/test/contracts/negative/error_typer_4.mligo diff --git a/src/test/contracts/error_typer_5.mligo b/src/test/contracts/negative/error_typer_5.mligo similarity index 100% rename from src/test/contracts/error_typer_5.mligo rename to src/test/contracts/negative/error_typer_5.mligo diff --git a/src/test/dune b/src/test/dune index 8d32a8624..24a44109f 100644 --- a/src/test/dune +++ b/src/test/dune @@ -15,7 +15,8 @@ (alias (name ligo-test) (action (run ./test.exe)) - (deps (glob_files contracts/*)) + (deps (glob_files contracts/*) + (glob_files contracts/negative/*)) ) (alias