Avoid shadowing common stringstring name in CHECK
This commit is contained in:
parent
1fac4bff06
commit
28bfa42ec3
27
debug.hpp
27
debug.hpp
@ -100,12 +100,13 @@
|
|||||||
_CHECK_META (almost_equal (__a, __b), \
|
_CHECK_META (almost_equal (__a, __b), \
|
||||||
{ ; }, \
|
{ ; }, \
|
||||||
{ \
|
{ \
|
||||||
std::ostringstream os; \
|
std::ostringstream __debug_check_neq_os; \
|
||||||
os << "expected equality.\n" \
|
__debug_check_neq_os \
|
||||||
|
<< "expected equality.\n" \
|
||||||
<< "__a: " << #A << " is " << __a << ")" \
|
<< "__a: " << #A << " is " << __a << ")" \
|
||||||
<< "\n != \n" \
|
<< "\n != \n" \
|
||||||
<< "__b: " << #B << " is " << __b << ")"; \
|
<< "__b: " << #B << " is " << __b << ")"; \
|
||||||
panic (os.str ()); \
|
panic (__debug_check_neq_os.str ()); \
|
||||||
}); \
|
}); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -116,12 +117,13 @@
|
|||||||
_CHECK_META (__a < __b, \
|
_CHECK_META (__a < __b, \
|
||||||
{ ; }, \
|
{ ; }, \
|
||||||
{ \
|
{ \
|
||||||
std::ostringstream os; \
|
std::ostringstream __debug_check_lt_os; \
|
||||||
os << "expected less than.\n" \
|
__debug_check_lt_os \
|
||||||
|
<< "expected less than.\n" \
|
||||||
<< "__a: " << #A << " is " << __a << ")" \
|
<< "__a: " << #A << " is " << __a << ")" \
|
||||||
<< "\n >= \n" \
|
<< "\n >= \n" \
|
||||||
<< "__b: " << #B << " is " << __b << ")"; \
|
<< "__b: " << #B << " is " << __b << ")"; \
|
||||||
panic (os.str ()); \
|
panic (__debug_check_lt_os.str ()); \
|
||||||
}); \
|
}); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -132,12 +134,13 @@
|
|||||||
_CHECK_META (__a > __b, \
|
_CHECK_META (__a > __b, \
|
||||||
{ ; }, \
|
{ ; }, \
|
||||||
{ \
|
{ \
|
||||||
std::ostringstream os; \
|
std::ostringstream __debug_check_gt_os; \
|
||||||
os << "expected greater than.\n" \
|
__debug_check_gt_os \
|
||||||
|
<< "expected greater than.\n" \
|
||||||
<< "__a: " << #A << " is " << __a << ")" \
|
<< "__a: " << #A << " is " << __a << ")" \
|
||||||
<< "\n <= \n" \
|
<< "\n <= \n" \
|
||||||
<< "__b: " << #B << " is " << __b << ")"; \
|
<< "__b: " << #B << " is " << __b << ")"; \
|
||||||
panic (os.str ()); \
|
panic (__debug_check_gt_os.str ()); \
|
||||||
}); \
|
}); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -148,12 +151,12 @@
|
|||||||
_CHECK_META (!almost_equal (__a, __b), \
|
_CHECK_META (!almost_equal (__a, __b), \
|
||||||
{ ; }, \
|
{ ; }, \
|
||||||
{ \
|
{ \
|
||||||
std::ostringstream os; \
|
std::ostringstream __debug_neq_os; \
|
||||||
os << "unexpected equality.\n" \
|
__debug_neq_os << "unexpected equality.\n" \
|
||||||
<< "__a: " << #A << " is " << __a << ")" \
|
<< "__a: " << #A << " is " << __a << ")" \
|
||||||
<< "\n == \n" \
|
<< "\n == \n" \
|
||||||
<< "__b: " << #B << " is " << __b << ")"; \
|
<< "__b: " << #B << " is " << __b << ")"; \
|
||||||
panic (os.str ()); \
|
panic (__debug_neq_os.str ()); \
|
||||||
}); \
|
}); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user