diff options
author | chriseth <chris@ethereum.org> | 2017-08-31 06:27:25 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-09-06 18:19:11 +0800 |
commit | 311be6b6599b363b89d34a584773bfa6c207b519 (patch) | |
tree | f6efb309ec5faac5af1aa29389c65eb34d830fc1 /test/libsolidity | |
parent | 5922306193c85127d9166b734c818dae1f284f2b (diff) | |
download | dexon-solidity-311be6b6599b363b89d34a584773bfa6c207b519.tar.gz dexon-solidity-311be6b6599b363b89d34a584773bfa6c207b519.tar.zst dexon-solidity-311be6b6599b363b89d34a584773bfa6c207b519.zip |
Fix warning checking in test framework.
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/AnalysisFramework.cpp | 2 | ||||
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 8 |
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(); } } )"; |