From 8ed5f5b995cca038d259a75e956416e4f2727238 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 20 Jan 2026 16:51:25 -0500 Subject: [PATCH] xo-indentlog: +1 more cond utest --- utest/cond.test.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/utest/cond.test.cpp b/utest/cond.test.cpp index e421c64..d360a44 100644 --- a/utest/cond.test.cpp +++ b/utest/cond.test.cpp @@ -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"); } }