Page MenuHomeFreeBSD

libc: Add a wide version of snprintf_test.
ClosedPublic

Authored by des on Sep 5 2023, 8:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 12:46 PM
Unknown Object (File)
Tue, Nov 5, 12:47 PM
Unknown Object (File)
Oct 4 2024, 11:23 PM
Unknown Object (File)
Oct 3 2024, 10:21 PM
Unknown Object (File)
Oct 1 2024, 1:22 PM
Unknown Object (File)
Sep 30 2024, 9:21 PM
Unknown Object (File)
Sep 22 2024, 1:03 PM
Unknown Object (File)
Sep 22 2024, 2:09 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Sep 5 2023, 8:14 AM
This revision is now accepted and ready to land.Sep 6 2023, 5:37 PM
emaste added a subscriber: emaste.
emaste added inline comments.
lib/libc/tests/stdio/snprintf_test.c
19–26

This (block) change is not necessarily required, but for diff reduction between the two versions?

Awesome new tests!

lib/libc/tests/stdio/snprintf_test.c
15–20

Is there a reason why this needs to be defined here (it's available in sys/param.h)?

24

Just in case someone adds a no-argument test.

lib/libc/tests/stdio/swprintf_test.c
17–20

Same comment as the previous one.

134
  1. This should be done in a setup fixture.
  2. An assertion ensuring the call succeeds should be added in the setup fixture.

This helps ensure that the preconditions for the test are being handled/checked properly and that if the locale does not exist, the test program doesn't crash on collection (that's what would happen if the assertion was placed in ATF_TP_ADD_TCS).

140

Whitespace.

des marked 5 inline comments as done.Sep 6 2023, 8:24 PM
des added inline comments.
lib/libc/tests/stdio/snprintf_test.c
15–20

I didn't want to pull it in just for that one trivial macro.

19–26

correct

lib/libc/tests/stdio/swprintf_test.c
134

There are precisely zero mentions of setup fixtures in the ATF documentation and zero occurrences of the word “setup” in the ATF C API headers.

140

matter of taste

This revision was automatically updated to reflect the committed changes.
des marked 3 inline comments as done.