From b8be060b30d7c47d7c967291d24b5f0b4bf6cbff Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 5 Oct 2017 19:31:32 +0100 Subject: Ensure unused variables are not warned for in interfaces/abstract contracts --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index a6fc4e34..c3dacc3d 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6210,6 +6210,26 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_parameter) CHECK_SUCCESS_NO_WARNINGS(text); } +BOOST_AUTO_TEST_CASE(no_unused_warning_interface_arguments) +{ + char const* text = R"( + interface I { + function f(uint a) pure public returns (uint b); + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + +BOOST_AUTO_TEST_CASE(no_unused_warning_abstract_arguments) +{ + char const* text = R"( + contract C { + function f(uint a) pure public returns (uint b); + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + BOOST_AUTO_TEST_CASE(no_unused_warnings) { char const* text = R"( -- cgit