mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2857 from ethereum/fixTestrefactor
Fix warning checking in test framework.
This commit is contained in:
commit
16526ad554
@ -59,7 +59,7 @@ AnalysisFramework::parseAnalyseAndReturnError(
|
|||||||
if (currentError->comment()->find("This is a pre-release compiler version") == 0)
|
if (currentError->comment()->find("This is a pre-release compiler version") == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (_reportWarnings == (currentError->type() == Error::Type::Warning))
|
if (_reportWarnings || (currentError->type() != Error::Type::Warning))
|
||||||
{
|
{
|
||||||
if (firstError && !_allowMultipleErrors)
|
if (firstError && !_allowMultipleErrors)
|
||||||
{
|
{
|
||||||
|
@ -4528,12 +4528,12 @@ BOOST_AUTO_TEST_CASE(warn_about_callcode)
|
|||||||
CHECK_WARNING(text, "\"callcode\" has been deprecated in favour");
|
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"(
|
char const* text = R"(
|
||||||
contract test {
|
contract test {
|
||||||
function callcode() {
|
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"(
|
char const* text = R"(
|
||||||
contract A {
|
contract A {
|
||||||
function transfer(uint) {}
|
function transfer() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
contract B {
|
contract B {
|
||||||
A a;
|
A a;
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
a.transfer(100);
|
a.transfer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
Loading…
Reference in New Issue
Block a user