Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/test/tools/assertion_result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class BOOST_TEST_DECL assertion_result {
{}

template<typename BoolConvertable>
assertion_result( BoolConvertable const& pv_ ) : p_predicate_value( !!pv_ ) {}
assertion_result( BoolConvertable const& pv_ ) : p_predicate_value( !!static_cast<bool>(pv_) ) {}

// Access methods
bool operator!() const { return !p_predicate_value; }
Expand Down
12 changes: 6 additions & 6 deletions include/boost/test/tools/old/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ do {
//____________________________________________________________________________//

#define BOOST_WARN( P ) BOOST_TEST_TOOL_IMPL( 2, \
(P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED, _ )
static_cast<bool>(P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED, _ )
#define BOOST_CHECK( P ) BOOST_TEST_TOOL_IMPL( 2, \
(P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
static_cast<bool>(P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
#define BOOST_REQUIRE( P ) BOOST_TEST_TOOL_IMPL( 2, \
(P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED, _ )
static_cast<bool>(P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED, _ )

//____________________________________________________________________________//

#define BOOST_WARN_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, WARN, CHECK_MSG, _ )
#define BOOST_CHECK_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, CHECK, CHECK_MSG, _ )
#define BOOST_REQUIRE_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, (P), M, REQUIRE, CHECK_MSG, _ )
#define BOOST_WARN_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, static_cast<bool>(P), M, WARN, CHECK_MSG, _ )
#define BOOST_CHECK_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, static_cast<bool>(P), M, CHECK, CHECK_MSG, _ )
#define BOOST_REQUIRE_MESSAGE( P, M ) BOOST_TEST_TOOL_IMPL( 2, static_cast<bool>(P), M, REQUIRE, CHECK_MSG, _ )

//____________________________________________________________________________//

Expand Down