We reverted #1227 because it was hitting issues in debug info generation (rdar://128155050), which have been fixed. Re-apply the PR.
This reverts commit ff5db5f5e3.
rdar://128159962
Merge the XCTests and swift-testing tests defined in extensions into
their parent TestItems.
This is done as another pass after the TestScanner visitors have walked
the tree.
Fixes#1218
Test specified with anonymous arguments would produce an id with extra
whitespace, i.e: `funcWithArgument(_ x: Int)` would produce a TestItem
id of `funcWithArgument(_ :)`
This patch trims this extra whitespace to produce IDs that are
consistent with Swift's function ids, i.e: `funcWithArgument(_:)`
Add a `components` property to MemberAccessExprSyntax that provides all
the base names and the member's name as an array. When resolving
swift-testing Tags check if they start with Tag or Testing.Tag and drop
that from the name.
Add a `components` property to MemberAccessExprSyntax that provides all
the base names and the member's name as an array. When resolving
swift-testing Tags check if they start with Tag or Testing.Tag and drop
that from the name.
This workspace-wide syntactic test index is used for two purposes:
- It is used for XCTests instead of the semantic index for files that have on-disk or in-memory modifications to files
- It is uses for swift-testing tests, which are only discovered syntactically.
rdar://119191037
This allows us to return swift-testing tests within a single document. It does not look for swift-testing tests workspace-wide (the `workspace/tests` request), which will be a follow-up PR.