aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-31 21:16:55 +0800
committerGitHub <noreply@github.com>2017-07-31 21:16:55 +0800
commit2abfdb65c8dcda6866143280b7ff1bde094a1419 (patch)
tree940ba55f0f27e8884332eaf90c11da48d5e98980
parentb063a37e703f6aa654cd2f94ecc38c148884cee5 (diff)
parentb930ce5e2a45be7fff1fdf1383f6474f786c6be1 (diff)
downloaddexon-solidity-2abfdb65c8dcda6866143280b7ff1bde094a1419.tar.gz
dexon-solidity-2abfdb65c8dcda6866143280b7ff1bde094a1419.tar.zst
dexon-solidity-2abfdb65c8dcda6866143280b7ff1bde094a1419.zip
Merge pull request #2668 from ethereum/fixImportRelease
Fix import error check for release version.
-rw-r--r--test/libsolidity/Imports.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/libsolidity/Imports.cpp b/test/libsolidity/Imports.cpp
index 00f093b7..03287b28 100644
--- a/test/libsolidity/Imports.cpp
+++ b/test/libsolidity/Imports.cpp
@@ -226,18 +226,19 @@ BOOST_AUTO_TEST_CASE(shadowing_builtins_with_imports)
}
)");
BOOST_CHECK(c.compile());
- auto numErrors = c.errors().size();
- // Sometimes we get the prerelease warning, sometimes not.
- BOOST_CHECK(2 <= numErrors && numErrors <= 3);
+ size_t errorCount = 0;
for (auto const& e: c.errors())
{
string const* msg = e->comment();
BOOST_REQUIRE(msg);
+ if (msg->find("pre-release") != string::npos)
+ continue;
BOOST_CHECK(
- msg->find("pre-release") != 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)