From 1b6775d0329a0edbb8886b9d3038851290322c2e 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 --- xo-indentlog/utest/cond.test.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xo-indentlog/utest/cond.test.cpp b/xo-indentlog/utest/cond.test.cpp index e421c642..d360a449 100644 --- a/xo-indentlog/utest/cond.test.cpp +++ b/xo-indentlog/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"); } }