diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 8 | ||||
-rw-r--r-- | test/libsolidity/ViewPureChecker.cpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index eb6a440e..513b5e2c 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5963,6 +5963,12 @@ BOOST_AUTO_TEST_CASE(interface_function_external) BOOST_AUTO_TEST_CASE(interface_function_public) { char const* text = R"( + interface I { + function f() public; + } + )"; + CHECK_WARNING(text, "Functions in interfaces should be declared external."); + text = R"( pragma experimental "v0.5.0"; interface I { function f() public; @@ -6306,7 +6312,7 @@ BOOST_AUTO_TEST_CASE(no_unused_warning_interface_arguments) { char const* text = R"( interface I { - function f(uint a) pure public returns (uint b); + function f(uint a) pure external returns (uint b); } )"; CHECK_SUCCESS_NO_WARNINGS(text); diff --git a/test/libsolidity/ViewPureChecker.cpp b/test/libsolidity/ViewPureChecker.cpp index 6353ae8a..debeb4dc 100644 --- a/test/libsolidity/ViewPureChecker.cpp +++ b/test/libsolidity/ViewPureChecker.cpp @@ -181,10 +181,10 @@ BOOST_AUTO_TEST_CASE(interface) { string text = R"( interface D { - function f() view public; + function f() view external; } contract C is D { - function f() view public {} + function f() view external {} } )"; CHECK_SUCCESS_NO_WARNINGS(text); |