Skip to content

tests/unit/README: describe how to unit test static functions#21018

Merged
bagder merged 1 commit intomasterfrom
bagder/write-unit-tests
Mar 20, 2026
Merged

tests/unit/README: describe how to unit test static functions#21018
bagder merged 1 commit intomasterfrom
bagder/write-unit-tests

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 19, 2026

UNITTEST explained

@bagder bagder force-pushed the bagder/write-unit-tests branch from 3c8f7ff to 2df0048 Compare March 20, 2026 06:50
@bagder bagder marked this pull request as ready for review March 20, 2026 06:50
@bagder bagder requested a review from Copilot March 20, 2026 06:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the unit test README to document how to unit test libcurl internal functions that are static in normal builds by using the UNITTEST macro and the generated lib/unitprotos.h.

Changes:

  • Added a “Testing static functions” section explaining UNITTEST vs static.
  • Documented the requirement to provide a UNITTEST prototype so the unit-prototype extraction can generate lib/unitprotos.h.
  • Included a small illustrative example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/README.md Outdated
Comment thread tests/unit/README.md Outdated
@bagder bagder force-pushed the bagder/write-unit-tests branch from 713f91d to 2b3332e Compare March 20, 2026 06:56
@bagder bagder closed this in 2b3332e Mar 20, 2026
@bagder bagder merged commit 2b3332e into master Mar 20, 2026
85 of 89 checks passed
@bagder bagder deleted the bagder/write-unit-tests branch March 20, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants