aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-09-06 19:23:30 +0800
committerGitHub <noreply@github.com>2017-09-06 19:23:30 +0800
commit16526ad554256bde3e185c99c1651b0f47725165 (patch)
treef6efb309ec5faac5af1aa29389c65eb34d830fc1
parent5922306193c85127d9166b734c818dae1f284f2b (diff)
parent311be6b6599b363b89d34a584773bfa6c207b519 (diff)
downloaddexon-solidity-16526ad554256bde3e185c99c1651b0f47725165.tar.gz
dexon-solidity-16526ad554256bde3e185c99c1651b0f47725165.tar.zst
dexon-solidity-16526ad554256bde3e185c99c1651b0f47725165.zip
Merge pull request #2857 from ethereum/fixTestrefactor
Fix warning checking in test framework.
-rw-r--r--test/libsolidity/AnalysisFramework.cpp2
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/test/libsolidity/AnalysisFramework.cpp b/test/libsolidity/AnalysisFramework.cpp
index 173d46bc..71bb4ca7 100644
--- a/test/libsolidity/AnalysisFramework.cpp
+++ b/test/libsolidity/AnalysisFramework.cpp
@@ -59,7 +59,7 @@ AnalysisFramework::parseAnalyseAndReturnError(
if (currentError->comment()->find("This is a pre-release compiler version") == 0)
continue;
- if (_reportWarnings == (currentError->type() == Error::Type::Warning))
+ if (_reportWarnings || (currentError->type() != Error::Type::Warning))
{
if (firstError && !_allowMultipleErrors)
{
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index f8863876..94404781 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -4528,12 +4528,12 @@ BOOST_AUTO_TEST_CASE(warn_about_callcode)
CHECK_WARNING(text, "\"callcode\" has been deprecated in favour");
}
-BOOST_AUTO_TEST_CASE(no_warn_about_callcode_as_local)
+BOOST_AUTO_TEST_CASE(no_warn_about_callcode_as_function)
{
char const* text = R"(
contract test {
function callcode() {
- var x = this.callcode;
+ test.callcode();
}
}
)";
@@ -6140,14 +6140,14 @@ BOOST_AUTO_TEST_CASE(does_not_error_transfer_regular_function)
{
char const* text = R"(
contract A {
- function transfer(uint) {}
+ function transfer() {}
}
contract B {
A a;
function() {
- a.transfer(100);
+ a.transfer();
}
}
)";