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)
Wed, May 8, 7:37 PM
Unknown Object (File)
Mon, May 6, 1:41 AM
Unknown Object (File)
Sun, May 5, 9:40 AM
Unknown Object (File)
Wed, May 1, 10:31 PM
Unknown Object (File)
Feb 19 2024, 12:08 AM
Unknown Object (File)
Jan 20 2024, 7:07 PM
Unknown Object (File)
Jan 9 2024, 1:44 AM
Unknown Object (File)
Dec 22 2023, 1:10 PM
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.