Skip to content

[6.2] Miscellaneous bookkeeping/cleanup of _TestDiscovery. #1057

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 1 commit into from
Apr 8, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Apr 7, 2025

This PR has a few minor changes:

- The default implementation of
`DiscoverableAsTestContent._testContentTypeNameHint` is not present if
`SWT_NO_LEGACY_TEST_DISCOVERY` is defined;
- Fixed the precondition in `TestContentKind.init(stringLiteral:)` so it
doesn't call `utf8CodeUnitCount` on single-character static strings;
- The implementation of `TestContentKind._fourCCValue` uses `isprint()`
to check if the kind value looks like a FourCC rather than calling
ICU-based functions;
- Fixed a type in a comment on
`SectionBounds.Kind.segmentAndSectionName`; and
- Simplified the implementation of
`TestContentKind.commentRepresentation` (in the macro target).

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
@grynspan grynspan added bug 🪲 Something isn't working macros 🔭 Related to Swift macros such as @Test or #expect discovery 🔎 test content discovery labels Apr 7, 2025
@grynspan grynspan added this to the Swift 6.2 milestone Apr 7, 2025
@grynspan grynspan self-assigned this Apr 7, 2025
@grynspan
Copy link
Contributor Author

grynspan commented Apr 7, 2025

@swift-ci test

@grynspan grynspan merged commit 94c3fc0 into release/6.2 Apr 8, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/test-discovery-cleanup-6.2 branch April 8, 2025 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working discovery 🔎 test content discovery macros 🔭 Related to Swift macros such as @Test or #expect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants