Skip to content

tests: constify command-line arguments#18076

Closed
vszakats wants to merge 7 commits intocurl:masterfrom
vszakats:consturl
Closed

tests: constify command-line arguments#18076
vszakats wants to merge 7 commits intocurl:masterfrom
vszakats:consturl

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 29, 2025

For libtests, tunits, units.

Also:

  • lib3033: tidy up headers.
  • lib/netrc: constify an arg in Curl_parsenetrc().

@vszakats vszakats added the tests label Jul 29, 2025
@vszakats vszakats changed the title tests: consitify command-line arguments tests: constify command-line arguments Jul 29, 2025
@bagder
Copy link
Member

bagder commented Jul 29, 2025

Isn't this a rather pointless exercise for test code? Does it help us in any way?

@vszakats
Copy link
Member Author

vszakats commented Jul 29, 2025

It cleans up codepaths a little. Bumped into this when tried defaulting URL to "" for client tests (*while merging clients into libtests)
Then realized via a compiler warning, that I'd need to strip const, which did not smell good.

Can't see any downside to this.

@vszakats vszakats closed this in cd58614 Jul 29, 2025
@vszakats
Copy link
Member Author

A one-time potential friction is if there is for new tests pending in PRs.
The entry point signatures of new tests will have to get const added.

@vszakats vszakats deleted the consturl branch July 29, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants