From 311be6b6599b363b89d34a584773bfa6c207b519 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 31 Aug 2017 00:27:25 +0200 Subject: Fix warning checking in test framework. --- test/libsolidity/AnalysisFramework.cpp | 2 +- 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(); } } )"; -- cgit v1.2.3