diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 29c0ccba..ab0f9c7b 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -3865,6 +3865,16 @@ BOOST_AUTO_TEST_CASE(payable_in_library) BOOST_CHECK(expectError(text) == Error::Type::TypeError); } +BOOST_AUTO_TEST_CASE(payable_external) +{ + char const* text = R"( + contract test { + function f() payable external {} + } + )"; + BOOST_CHECK(success(text)); +} + BOOST_AUTO_TEST_CASE(payable_internal) { char const* text = R"( @@ -3875,6 +3885,16 @@ BOOST_AUTO_TEST_CASE(payable_internal) BOOST_CHECK(expectError(text) == Error::Type::TypeError); } +BOOST_AUTO_TEST_CASE(payable_private) +{ + char const* text = R"( + contract test { + function f() payable private {} + } + )"; + BOOST_CHECK(expectError(text) == Error::Type::TypeError); +} + BOOST_AUTO_TEST_CASE(illegal_override_payable) { char const* text = R"( |