mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added workaround for when msvc defines small and near macros
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@688 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
028a3c3650
commit
df5bb8cf3c
1 changed files with 16 additions and 0 deletions
|
|
@ -30,8 +30,16 @@ namespace mock
|
||||||
MOCK_NARY_CONSTRAINT( less_equal, 1, ( expected ), actual <= expected )
|
MOCK_NARY_CONSTRAINT( less_equal, 1, ( expected ), actual <= expected )
|
||||||
MOCK_NARY_CONSTRAINT( greater_equal, 1, ( expected ), actual >= expected )
|
MOCK_NARY_CONSTRAINT( greater_equal, 1, ( expected ), actual >= expected )
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma push_macro( "small" )
|
||||||
|
# undef small
|
||||||
|
#endif
|
||||||
MOCK_NARY_CONSTRAINT( small, 1, ( expected ), \
|
MOCK_NARY_CONSTRAINT( small, 1, ( expected ), \
|
||||||
( boost::test_tools::check_is_small( actual, expected ) ) )
|
( boost::test_tools::check_is_small( actual, expected ) ) )
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma pop_macro( "small" )
|
||||||
|
#endif
|
||||||
|
|
||||||
MOCK_NARY_CONSTRAINT( close, 2, ( expected, tolerance ), \
|
MOCK_NARY_CONSTRAINT( close, 2, ( expected, tolerance ), \
|
||||||
( boost::test_tools::check_is_close( \
|
( boost::test_tools::check_is_close( \
|
||||||
actual, expected, \
|
actual, expected, \
|
||||||
|
|
@ -40,8 +48,16 @@ namespace mock
|
||||||
( boost::test_tools::check_is_close( \
|
( boost::test_tools::check_is_close( \
|
||||||
actual, expected, \
|
actual, expected, \
|
||||||
boost::test_tools::fraction_tolerance( tolerance ) ) ) )
|
boost::test_tools::fraction_tolerance( tolerance ) ) ) )
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma push_macro( "near" )
|
||||||
|
# undef near
|
||||||
|
#endif
|
||||||
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ), \
|
MOCK_NARY_CONSTRAINT( near, 2, ( expected, tolerance ), \
|
||||||
std::abs( actual - expected ) < tolerance )
|
std::abs( actual - expected ) < tolerance )
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma pop_macro( "near" )
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue