aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorSuman <ssubash@commvault.com>2017-08-29 23:58:38 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-12 22:35:03 +0800
commit10d290cb9b131f620c56c0bc84a9ab5bcf50368b (patch)
treeaaa7cab938f3f9ec5376503f93dff09aa649f9b6 /test/libsolidity
parentf2412da80002ad2ca686b8a64210c933ee2f1942 (diff)
downloaddexon-solidity-10d290cb9b131f620c56c0bc84a9ab5bcf50368b.tar.gz
dexon-solidity-10d290cb9b131f620c56c0bc84a9ab5bcf50368b.tar.zst
dexon-solidity-10d290cb9b131f620c56c0bc84a9ab5bcf50368b.zip
Display helpful warning for unused function arguments/return parameters
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp14
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) {