Skip to content

Simplify the logic for parsing and handling test arguments in the @Test macro #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

stmontgomery
Copy link
Contributor

This is a minor refactor of the logic and data structures in the @Test macro implementation responsible for parsing and handling test function argument expressions.

Motivation:

I discovered there was a way to simplify this logic while working on #808, and since this isn't strictly pertinent to that PR I wanted to extract it and land it separately here.

Modifications:

  • Remove the need to hardcode the parameter label arguments: in three places.
  • Remove the need to iterate a Collection using raw indices.
  • Resolve one "TODO" comment.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery force-pushed the test-args-attr-discovery branch from 7460fce to 77c469b Compare November 22, 2024 21:38
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit 0098422 into swiftlang:main Dec 10, 2024
3 checks passed
@stmontgomery stmontgomery deleted the test-args-attr-discovery branch December 10, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy