qa test: fix a compil issue by modifying the way BOOST_PRINT namespace is used in geometry.h

This commit is contained in:
jean-pierre charras 2019-01-11 10:58:38 +01:00
parent 353bda6792
commit bd4222cc84
2 changed files with 12 additions and 6 deletions

View File

@ -8,17 +8,20 @@
#include <math/box2.h>
#include <math/vector2d.h>
/**
* Printer for BOX2I type
*/
template <> struct BOOST_PRINT::print_log_value<BOX2I>
namespace BOOST_PRINT_NAMESPACE
{
template <> struct print_log_value<BOX2I>
{
void operator()( std::ostream& os, const BOX2I& aBox )
{
os << "BOX[ " << aBox.GetOrigin() << " + " << aBox.GetSize() << " ]";
}
};
} // namespace BOOST_PRINT_NAMESPACE
namespace KI_TEST
{

View File

@ -81,12 +81,15 @@
* Define a helper to make it easier to use the right namespace for
* defining the print helpers like this:
*
* namespace BOOST_PRINT_NAMESPACE
* {
* template<>
* struct BOOST_PRINT::print_log_value< MY_TYPE >
* struct print_log_value< MY_TYPE >
* }
*/
#if BOOST_VERSION < 105900
namespace BOOST_PRINT = boost::test_tools;
#define BOOST_PRINT_NAMESPACE boost::test_tools
#else
namespace BOOST_PRINT = boost::test_tools::tt_detail;
#define BOOST_PRINT_NAMESPACE boost::test_tools::tt_detail
#endif
#endif // UNIT_TEST_UTILS__H