diff options
author | chriseth <chris@ethereum.org> | 2017-09-12 23:57:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 23:57:55 +0800 |
commit | 5084a9cda9ed913e50cf393d21764a620827191c (patch) | |
tree | 579ff7b68fc24ff60431250ff02388b3c46e34bd /test | |
parent | 14f103ca6024722cdbfb0a1c2a3837df635fbdef (diff) | |
parent | 10d290cb9b131f620c56c0bc84a9ab5bcf50368b (diff) | |
download | dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar.gz dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar.bz2 dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar.lz dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar.xz dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.tar.zst dexon-solidity-5084a9cda9ed913e50cf393d21764a620827191c.zip |
Merge pull request #2852 from ssuman/develop
This commit will display warning when there is unused function parameter
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 7bef8fec..1fbc55a2 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5816,7 +5816,7 @@ BOOST_AUTO_TEST_CASE(warn_unused_local) } } )"; - CHECK_WARNING(text, "Unused"); + CHECK_WARNING(text, "Unused local variable."); } BOOST_AUTO_TEST_CASE(warn_unused_local_assigned) @@ -5828,10 +5828,10 @@ BOOST_AUTO_TEST_CASE(warn_unused_local_assigned) } } )"; - CHECK_WARNING(text, "Unused"); + CHECK_WARNING(text, "Unused local variable."); } -BOOST_AUTO_TEST_CASE(warn_unused_param) +BOOST_AUTO_TEST_CASE(warn_unused_function_parameter) { char const* text = R"( contract C { @@ -5839,7 +5839,7 @@ BOOST_AUTO_TEST_CASE(warn_unused_param) } } )"; - CHECK_WARNING(text, "Unused"); + CHECK_WARNING(text, "Unused function parameter. Remove or comment out the variable name to silence this warning."); text = R"( contract C { function f(uint a) { @@ -5849,7 +5849,7 @@ BOOST_AUTO_TEST_CASE(warn_unused_param) success(text); } -BOOST_AUTO_TEST_CASE(warn_unused_return_param) +BOOST_AUTO_TEST_CASE(warn_unused_return_parameter) { char const* text = R"( contract C { @@ -5857,7 +5857,7 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_param) } } )"; - CHECK_WARNING(text, "Unused"); + CHECK_WARNING(text, "Unused function parameter. Remove or comment out the variable name to silence this warning."); text = R"( contract C { function f() returns (uint a) { @@ -5865,7 +5865,7 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_param) } } )"; - CHECK_WARNING(text, "Unused"); + CHECK_WARNING(text, "Unused function parameter. Remove or comment out the variable name to silence this warning."); text = R"( contract C { function f() returns (uint) { |