Format null string as (nil) with p specifier
This commit is contained in:
1 parent
5e37698911
commit
57ba9436a0
2 files changed
+10
-1
No files matched your search
@@ -431,6 +431,8 @@ TEST(PrintfTest, Pointer) {
|
||||
EXPECT_PRINTF("(nil)", "%p", p);
|
||||
const char *s = "test";
|
||||
EXPECT_PRINTF(fmt::format("{:p}", s), "%p", s);
|
||||
const char *null_str = 0;
|
||||
EXPECT_PRINTF("(nil)", "%p", null_str);
|
||||
}
|
||||
|
||||
TEST(PrintfTest, Custom) {
|
||||
|
||||
Reference in new issue
Block a user