Added more fail tests
This commit is contained in:
parent
c68b52d78d
commit
70f963f4b9
@ -356,7 +356,13 @@ failing_contracts() ->
|
||||
<<"Use 'entrypoint' for declaration of foo (at line 6, column 3):\n entrypoint foo : () => unit">>,
|
||||
<<"Use 'entrypoint' instead of 'function' for public function foo (at line 10, column 3):\n entrypoint foo() = ()">>,
|
||||
<<"Use 'entrypoint' instead of 'function' for public function foo (at line 6, column 3):\n entrypoint foo : () => unit">>]}
|
||||
, {"list_comp_fail",
|
||||
, {"list_comp_not_a_list",
|
||||
[<<"Cannot unify int\n and list('a)\nwhen checking rvalue of list comprehension binding at line 2, column 36\n 1 : int\nagainst type \n list('a)">>
|
||||
]}
|
||||
, {"list_comp_if_not_bool",
|
||||
[<<"Cannot unify int\n and bool\nwhen checking the type of the expression at line 2, column 44\n 3 : int\nagainst the expected type\n bool">>
|
||||
]}
|
||||
, {"list_comp_bad_shadow",
|
||||
[<<"Cannot unify int\n and string\nwhen checking the type of the pattern at line 2, column 53\n x : int\nagainst the expected type\n string">>
|
||||
]}
|
||||
].
|
||||
|
2
test/contracts/list_comp_bad_shadow.aes
Normal file
2
test/contracts/list_comp_bad_shadow.aes
Normal file
@ -0,0 +1,2 @@
|
||||
contract BadComp =
|
||||
entrypoint failing() = [x + 1 | x <- [1,2,3], let x = "XD"]
|
2
test/contracts/list_comp_if_not_bool.aes
Normal file
2
test/contracts/list_comp_if_not_bool.aes
Normal file
@ -0,0 +1,2 @@
|
||||
contract BadComp =
|
||||
entrypoint failing() = [x | x <- [], if (3)]
|
Loading…
x
Reference in New Issue
Block a user