Skip to content

Support Swift Testing#56

Merged
alexey1312 merged 2 commits intoldomaradzki:masterfrom
jeremyabannister:master
Feb 4, 2026
Merged

Support Swift Testing#56
alexey1312 merged 2 commits intoldomaradzki:masterfrom
jeremyabannister:master

Conversation

@jeremyabannister
Copy link
Contributor

I had Codex make these changes. I haven't taken the time to learn about the implementation of xcsift so as to be able to review the changes, but I thought that if I provide a test and an implementation that at least works (even if it's not elegant) it might be helpful in getting Swift Testing support added to xcsift.

jeremyabannister and others added 2 commits February 3, 2026 18:19
- Add extractSwiftTestingName() helper function that handles both:
  - Quoted format: Test "Human readable name" ...
  - Unquoted format: Test functionName() ...

- Replace 4 separate parsing blocks (~80 lines) with 1 universal block
  that uses the helper function

- Add tests for quoted format and mixed format scenarios

- Remove code duplication while maintaining full backward compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@alexey1312
Copy link
Collaborator

alexey1312 commented Feb 3, 2026

Hey @jeremyabannister , thanks for the contribution!

Your PR correctly identified the gap in Swift Testing support — the SF Symbols and unquoted function names were indeed missing from the parser.

I've pushed a small refactoring commit on top of your work. The 4 separate parsing blocks (quoted/unquoted × recorded/failed) are now merged into one using an extractSwiftTestingName() helper. This cuts about 30 lines and makes it easier to add new patterns later if needed.

Also added a couple of tests for the quoted @Test("displayName") format to make sure both paths work.

All 278 tests pass.

@alexey1312
Copy link
Collaborator

Mind giving it a quick test on your end? Want to make sure the refactored parsing still catches everything you were seeing before we merge.

@jeremyabannister
Copy link
Contributor Author

Yep, still working for me, thanks for cleaning it up

@alexey1312 alexey1312 merged commit 850fa34 into ldomaradzki:master Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants