QA: Allow BOOST_CHECKing of nullptr_t

Before Boost 1.64, there was no test logging function
for std::nullptr_t.

Add a logging struct to Boost to deal with this, and some
macros to assist in similar cases. These macros are bit
untidy-looking, but due to GCC bug #56480, we can't use
namespace aliasing to solve this. From Boost 1.64 onwards,
these namespaces are not needed at all.

Remove some code added to work around lack of nullptr printing
in the past.

These macros, and the nullptr printer, can be removed when
the Boost min version is 1.64 or greater.
This commit is contained in:
John Beard
2019-03-29 09:50:09 +00:00
parent 2447933b54
commit ad76ebd82a
2 changed files with 54 additions and 6 deletions
+2 -6
View File
@@ -332,12 +332,8 @@ BOOST_AUTO_TEST_CASE( URIs )
const LIB_TABLE_ROW* row = m_mainTableNoFb.FindRowByURI( "://lib/1" );
// A LIB_TABLE_ROW* nullptr for BOOST_CHECK_NE, because some boost version
// do not handle a nullptr with no type
const LIB_TABLE_ROW* null_row = nullptr;
// should be found
BOOST_CHECK_NE( null_row, row );
BOOST_CHECK_NE( nullptr, row );
if( row )
{
@@ -346,7 +342,7 @@ BOOST_AUTO_TEST_CASE( URIs )
row = m_mainTableNoFb.FindRowByURI( "this_uri_is_not_found" );
BOOST_CHECK_EQUAL( null_row, row );
BOOST_CHECK_EQUAL( nullptr, row );
}