[libc-commits] [libc] Add bit width length modifier to printf (PR #82461)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Feb 28 10:50:42 PST 2024
================
@@ -169,6 +170,52 @@ TEST(LlvmLibcSPrintfTest, IntConv) {
EXPECT_EQ(written, 20);
ASSERT_STREQ(buff, "-9223372036854775808"); // ll min
+ written = LIBC_NAMESPACE::sprintf(buff, "%w3d", 5807);
----------------
michaelrj-google wrote:
you also need tests that check the behavior of incorrect bit-widths. You need at least one test each for `%w0d`, `%w999d`, and `%w-1d`.
https://github.com/llvm/llvm-project/pull/82461
More information about the libc-commits
mailing list