Add tests
This commit is contained in:
parent
3b7f083817
commit
6499823e5f
@ -1175,6 +1175,13 @@ failing_contracts() ->
|
||||
[<<?Pos(5,16)
|
||||
"`f` must be payable because the entrypoint `f` in the interface `I` is payable">>
|
||||
])
|
||||
, ?TYPE_ERROR(calling_child_contract_entrypoint,
|
||||
[<<?Pos(5,20)
|
||||
"Invalid call to contract entrypoint `F.g`.\n"
|
||||
"It must be called as `c.g` for some `c : F`.">>])
|
||||
, ?TYPE_ERROR(using_contract_as_namespace,
|
||||
[<<?Pos(5,3)
|
||||
"Cannot use undefined namespace F">>])
|
||||
].
|
||||
|
||||
validation_test_() ->
|
||||
|
5
test/contracts/calling_child_contract_entrypoint.aes
Normal file
5
test/contracts/calling_child_contract_entrypoint.aes
Normal file
@ -0,0 +1,5 @@
|
||||
contract F =
|
||||
entrypoint g() = 1
|
||||
|
||||
main contract C =
|
||||
entrypoint f() = F.g()
|
7
test/contracts/using_contract_as_namespace.aes
Normal file
7
test/contracts/using_contract_as_namespace.aes
Normal file
@ -0,0 +1,7 @@
|
||||
contract F =
|
||||
entrypoint g() = 1
|
||||
|
||||
main contract C =
|
||||
using F for [g]
|
||||
|
||||
entrypoint f() = g()
|
Loading…
x
Reference in New Issue
Block a user