xo-indentlog: +1 more cond utest
This commit is contained in:
parent
922d250f36
commit
8ed5f5b995
1 changed files with 14 additions and 1 deletions
|
|
@ -37,8 +37,21 @@ namespace ut {
|
|||
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
int * ptr = nullptr;
|
||||
ss << cond(ptr != nullptr, xtag("ptr", 123), xtag("ptr", "null"));
|
||||
|
||||
ss << cond(ptr, xtag("ptr", 123), xtag("ptr", "null"));
|
||||
|
||||
REQUIRE(ss.str() == " :ptr null");
|
||||
}
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
int * ptr = nullptr;
|
||||
|
||||
ss << xtag("ptr", cond(ptr, 123, "null"));
|
||||
|
||||
REQUIRE(ss.str() == " :ptr null");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue