diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-06 02:31:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-06 02:31:53 +0800 |
commit | b8be060b30d7c47d7c967291d24b5f0b4bf6cbff (patch) | |
tree | fa7cc61bc63e3b83cf5f4d4dcbfe58f2fb797023 /test/libsolidity | |
parent | b8e904616a22507371fd994a3193412711ab6ddd (diff) | |
download | dexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.tar.gz dexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.tar.zst dexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.zip |
Ensure unused variables are not warned for in interfaces/abstract contracts
Diffstat (limited to 'test/libsolidity')
-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 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"( |