Expand the tests for missing init function
This commit is contained in:
parent
64682aa10c
commit
6b309c9381
@ -208,6 +208,7 @@ compilable_contracts() ->
|
|||||||
"polymorphism_contract_interface_extensions",
|
"polymorphism_contract_interface_extensions",
|
||||||
"polymorphism_contract_interface_same_decl_multi_interface",
|
"polymorphism_contract_interface_same_decl_multi_interface",
|
||||||
"polymorphism_contract_interface_same_name_same_type",
|
"polymorphism_contract_interface_same_name_same_type",
|
||||||
|
"missing_init_fun_state_unit",
|
||||||
"test" % Custom general-purpose test file. Keep it last on the list.
|
"test" % Custom general-purpose test file. Keep it last on the list.
|
||||||
].
|
].
|
||||||
|
|
||||||
@ -1035,9 +1036,14 @@ failing_contracts() ->
|
|||||||
[<<?Pos(3,12)
|
[<<?Pos(3,12)
|
||||||
"The event type cannot be parameterized">>
|
"The event type cannot be parameterized">>
|
||||||
])
|
])
|
||||||
, ?TYPE_ERROR(missing_init_function,
|
, ?TYPE_ERROR(missing_init_fun_alias_to_type,
|
||||||
[<<?Pos(1,10)
|
[<<?Pos(1,10)
|
||||||
"Missing `init` function for the contract `MissingInitFunction`.\n"
|
"Missing `init` function for the contract `AliasToType`.\n"
|
||||||
|
"The `init` function can only be omitted if the state type is `unit`">>
|
||||||
|
])
|
||||||
|
, ?TYPE_ERROR(missing_init_fun_alias_to_alias_to_type,
|
||||||
|
[<<?Pos(1,10)
|
||||||
|
"Missing `init` function for the contract `AliasToAliasToType`.\n"
|
||||||
"The `init` function can only be omitted if the state type is `unit`">>
|
"The `init` function can only be omitted if the state type is `unit`">>
|
||||||
])
|
])
|
||||||
].
|
].
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
contract AliasToAliasToType =
|
||||||
|
type alias = int * int
|
||||||
|
type state = alias
|
2
test/contracts/missing_init_fun_alias_to_type.aes
Normal file
2
test/contracts/missing_init_fun_alias_to_type.aes
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
contract AliasToType =
|
||||||
|
type state = int * int
|
9
test/contracts/missing_init_fun_state_unit.aes
Normal file
9
test/contracts/missing_init_fun_state_unit.aes
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
contract AliasToAliasToUnit =
|
||||||
|
type alias = unit
|
||||||
|
type state = alias
|
||||||
|
|
||||||
|
contract AliasToUnit =
|
||||||
|
type state = unit
|
||||||
|
|
||||||
|
main contract ImplicitState =
|
||||||
|
type sometype = int
|
@ -1,3 +0,0 @@
|
|||||||
contract MissingInitFunction =
|
|
||||||
type state = int * int
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user