From 5998f315430bdbbed6b8638385f2288fc136611a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 11 Dec 2019 14:00:41 +0000 Subject: [PATCH] Use BOOST_REQUIRE instead of BOOST_CHECK in LibSolc tests where appropriate --- test/libsolidity/LibSolc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/libsolidity/LibSolc.cpp b/test/libsolidity/LibSolc.cpp index 9d3d16cee..7f6b30355 100644 --- a/test/libsolidity/LibSolc.cpp +++ b/test/libsolidity/LibSolc.cpp @@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(standard_compilation) } )"; Json::Value result = compile(input); - BOOST_CHECK(result.isObject()); + BOOST_REQUIRE(result.isObject()); // Only tests some assumptions. The StandardCompiler is tested properly in another suite. BOOST_CHECK(result.isMember("sources")); @@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE(missing_callback) } )"; Json::Value result = compile(input); - BOOST_CHECK(result.isObject()); + BOOST_REQUIRE(result.isObject()); BOOST_CHECK(containsError(result, "ParserError", "Source \"missing.sol\" not found: File not supplied initially.")); } @@ -148,9 +148,9 @@ BOOST_AUTO_TEST_CASE(with_callback) [](void* _context, char const* _kind, char const* _path, char** o_contents, char** o_error) { // Passed in a nullptr in the compile() helper above. - BOOST_CHECK(_context == nullptr); + BOOST_REQUIRE(_context == nullptr); // Caller frees the pointers. - BOOST_CHECK(string(_kind) == ReadCallback::kindString(ReadCallback::Kind::ReadFile)); + BOOST_REQUIRE(string(_kind) == ReadCallback::kindString(ReadCallback::Kind::ReadFile)); if (string(_path) == "found.sol") { static string content{"import \"missing.sol\"; contract B {}"}; @@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE(with_callback) }; Json::Value result = compile(input, callback); - BOOST_CHECK(result.isObject()); + BOOST_REQUIRE(result.isObject()); // This ensures that "found.sol" was properly loaded which triggered the second import statement. BOOST_CHECK(containsError(result, "ParserError", "Source \"missing.sol\" not found: Missing file."));