Skip to content

Commit b104d54

Browse files
authored
Merge pull request #1151 from ahoppen/ahoppen/swift-testing-discovery
Implement test discovery for swift-testing tests for the `textDocument/tests` request
2 parents 63171ab + 1770204 commit b104d54

File tree

5 files changed

+1092
-14
lines changed

5 files changed

+1092
-14
lines changed

Sources/LanguageServerProtocol/SupportTypes/TestItem.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public struct TestItem: ResponseType, Equatable {
3939
/// When `nil` the `label` is used.
4040
public let sortText: String?
4141

42+
/// Whether the test is disabled.
43+
public let disabled: Bool
44+
45+
/// The type of test, eg. the testing framework that was used to declare the test.
46+
public let style: String
47+
4248
/// The location of the test item in the source code.
4349
public let location: Location
4450

@@ -55,6 +61,8 @@ public struct TestItem: ResponseType, Equatable {
5561
label: String,
5662
description: String? = nil,
5763
sortText: String? = nil,
64+
disabled: Bool,
65+
style: String,
5866
location: Location,
5967
children: [TestItem],
6068
tags: [TestTag]
@@ -63,6 +71,8 @@ public struct TestItem: ResponseType, Equatable {
6371
self.label = label
6472
self.description = description
6573
self.sortText = sortText
74+
self.disabled = disabled
75+
self.style = style
6676
self.location = location
6777
self.children = children
6878
self.tags = tags

Sources/SourceKitLSP/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ target_sources(SourceKitLSP PRIVATE
4242
Swift/SourceKitD+ResponseError.swift
4343
Swift/SwiftCommand.swift
4444
Swift/SwiftLanguageService.swift
45+
Swift/SwiftTestingScanner.swift
4546
Swift/SymbolInfo.swift
4647
Swift/SyntaxHighlightingToken.swift
4748
Swift/SyntaxHighlightingTokens.swift

0 commit comments

Comments
 (0)