curl/tests/tunit
Viktor Szakats 2f3fa479dd
build: enable -Wformat-signedness, fix issues found
Adjust code to avoid `-Wformat-signedness` warnings, while making sure
that enums are always cast to a known type when passing them to `printf`
functions, to support compilers and compiler settings where enums are
not default-size signed ints.

- cast integers printed as hex to `unsigned`. (63 times, 20 of them in
  `mbedtls.c`)
- cast misc enums to `int` for printing. (31 times)
- cast `CURL_LOCK_DATA_*` enums to `int`. (4 times)
- cast `CURL_FORMADD_*` enums to `int`. (13 times)
- cast `CURLSHE_*` enums to `int`. (3 times)
- cast `CURLUE_*` enums to `int`. (33 times)
- cast `CURLMSG_*` enums to `int`. (6 times)
- cast `CURLE_*` enums to `int`. (~380 times)
- unit1675: fix mask.
  Follow-up to 7c34365cce #21879

Ref: #18343 (initial attempt)

Closes #20848
2026-06-10 15:14:08 +02:00
..
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt cmake: rename testbins target to tt, restore internal option 2026-03-01 00:24:47 +01:00
Makefile.am autotools: limit checksrc target to ignore non-repo test sources 2026-03-12 01:45:24 +01:00
Makefile.inc tool_dirhie: fix to create drive-relative directory 2026-04-27 12:09:09 +02:00
README.md tests/tunit: make a separate directory for tool-based unit tests 2025-04-08 08:08:05 +02:00
tool1394.c tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
tool1604.c tidy-up: miscellaneous 2026-04-14 01:08:32 +02:00
tool1621.c build: fix -Wformat-signedness by adjusting printf masks 2026-04-16 10:32:50 +02:00
tool1622.c tool1622: assert width and exact format boundaries 2026-05-07 08:00:03 +02:00
tool1623.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
tool1720.c tool_dirhie: fix to create drive-relative directory 2026-04-27 12:09:09 +02:00

Tool unit tests

This directory is for unit testing of tool functions. They are separate from libcurl unit tests, because how these live/work outside of the library and the libcurl unit tests live/work inside.