[llvm] Introduce LDBG_OS() macro as a variant of LDBG() (PR #157194)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 10:22:20 PDT 2025
================
@@ -128,6 +128,131 @@ TEST(DebugLogTest, DestructorPrefix) {
// After destructors, nothing should have been printed.
EXPECT_EQ(os.str(), "");
}
+
+TEST(DebugLogTest, LDBG_MACROS) {
----------------
joker-eph wrote:
gtest prints the line number and the detail of a failing comparison.
e.g. if I intentionally break one of the reference output:
```
[ RUN ] DebugLogTest.LDBG_MACROS
llvm/unittests/Support/DebugLogTest.cpp:146: Failure
Expected equality of these values:
DebugOs.str()
Which is: "[A:1] DebugLogTest.cpp:143 Hello, world!\n"
RefOs.str()
Which is: "[A:2] DebugLogTest.cpp:143 Hello, world!\n"
```
Clicking on the file/line leads directly to the offending EXPECT_EQ.
https://github.com/llvm/llvm-project/pull/157194
More information about the llvm-commits
mailing list