Merge pull request #2857 from ethereum/fixTestrefactor

Fix warning checking in test framework.
This commit is contained in:
Alex Beregszaszi 2017-09-06 12:23:30 +01:00 committed by GitHub
commit 16526ad554
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();
}
}
)";