Fix warning checking in test framework.

This commit is contained in:
chriseth 2017-08-31 00:27:25 +02:00
parent 5922306193
commit 311be6b659
2 changed files with 5 additions and 5 deletions

View File

@ -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)
{

View File

@ -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();
}
}
)";