Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #238063

Category None
Changed by Daniel Stenberg <danielohnoyoudont@haxx.se>
Changed at Mon 30 Jun 2025 23:16:40
Repository https://api.github.com/repos/curl/curl
Project curl/curl
Branch master
Revision c9bb9cd165c1b25c2fe005befdcfe479fc9b68e1

Comments

unit tests: extract "private" prototypes at build time

In order to do unit tests for private functions, functions that are
marked UNITTEST but without a global scope in the library, functions
that do not have prototypes in their corresponding header file, unit
tests previously brought their own private prototype *copy* into the
unit test.

This was error-prone when the internal function changes but the change
might be missed in the unit test which then uses an outdated prototype
copy for testing.

This change removes the private prototypes from unit tests and instead
introduces a C file parser that parses the specific C files and extracts
the necessary unit test prototypes into a generated header file for unit
tests to use. This geneated lib/unitprotos.h header is then included by
unit tests that need private prototypes.

Assisted-by: Viktor Szakats
Closes #17750

Changed files