mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2668 from ethereum/fixImportRelease
Fix import error check for release version.
This commit is contained in:
commit
2abfdb65c8
@ -226,18 +226,19 @@ BOOST_AUTO_TEST_CASE(shadowing_builtins_with_imports)
|
|||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
BOOST_CHECK(c.compile());
|
BOOST_CHECK(c.compile());
|
||||||
auto numErrors = c.errors().size();
|
size_t errorCount = 0;
|
||||||
// Sometimes we get the prerelease warning, sometimes not.
|
|
||||||
BOOST_CHECK(2 <= numErrors && numErrors <= 3);
|
|
||||||
for (auto const& e: c.errors())
|
for (auto const& e: c.errors())
|
||||||
{
|
{
|
||||||
string const* msg = e->comment();
|
string const* msg = e->comment();
|
||||||
BOOST_REQUIRE(msg);
|
BOOST_REQUIRE(msg);
|
||||||
|
if (msg->find("pre-release") != string::npos)
|
||||||
|
continue;
|
||||||
BOOST_CHECK(
|
BOOST_CHECK(
|
||||||
msg->find("pre-release") != string::npos ||
|
|
||||||
msg->find("shadows a builtin symbol") != string::npos
|
msg->find("shadows a builtin symbol") != string::npos
|
||||||
);
|
);
|
||||||
|
errorCount++;
|
||||||
}
|
}
|
||||||
|
BOOST_CHECK_EQUAL(errorCount, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(shadowing_builtins_with_multiple_imports)
|
BOOST_AUTO_TEST_CASE(shadowing_builtins_with_multiple_imports)
|
||||||
|
Loading…
Reference in New Issue
Block a user