Make check_{neq|eq} output more explicit
As the panic message mentions __a and __b, use these explicitly in the error message and equate them to concrete values. Do not use parenthesis to show the computed value as these can be mistaken for functions.
This commit is contained in:
parent
4234171e92
commit
6f1bf3ebf9
10
debug.hpp
10
debug.hpp
@ -71,9 +71,9 @@
|
||||
{ \
|
||||
std::ostringstream os; \
|
||||
os << "expected equality.\n" \
|
||||
<< #A << '(' << __a << ")" \
|
||||
<< "__a: " << #A << " is " << __a << ")" \
|
||||
<< "\n != \n" \
|
||||
<< #B << '(' << __b << ")"; \
|
||||
<< "__b: " << #B << " is " << __b << ")"; \
|
||||
panic (os.str ()); \
|
||||
}); \
|
||||
} while (0)
|
||||
@ -86,8 +86,10 @@
|
||||
{ ; }, \
|
||||
{ \
|
||||
std::ostringstream os; \
|
||||
os << "unexepected equality.\n" \
|
||||
<< __a << "\n ==\n" << __b; \
|
||||
os << "unexpected equality.\n" \
|
||||
<< "__a: " << #A << " is " << __a << ")" \
|
||||
<< "\n == \n" \
|
||||
<< "__b: " << #B << " is " << __b << ")"; \
|
||||
panic (os.str ()); \
|
||||
}); \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user