@@ -19,6 +19,7 @@ import XCTest
19
19
20
20
final class FormattingTests : XCTestCase {
21
21
func testFormatting( ) async throws {
22
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
22
23
let testClient = try await TestSourceKitLSPClient ( )
23
24
let uri = DocumentURI . for ( . swift)
24
25
@@ -52,6 +53,7 @@ final class FormattingTests: XCTestCase {
52
53
}
53
54
54
55
func testFormattingNoEdits( ) async throws {
56
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
55
57
let testClient = try await TestSourceKitLSPClient ( )
56
58
let uri = DocumentURI . for ( . swift)
57
59
@@ -77,6 +79,7 @@ final class FormattingTests: XCTestCase {
77
79
}
78
80
79
81
func testConfigFileOnDisk( ) async throws {
82
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
80
83
// We pick up an invalid swift-format configuration file and thus don't set the user-provided options.
81
84
let ws = try await MultiFileTestWorkspace ( files: [
82
85
" .swift-format " : """
@@ -111,6 +114,7 @@ final class FormattingTests: XCTestCase {
111
114
}
112
115
113
116
func testConfigFileInParentDirectory( ) async throws {
117
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
114
118
// We pick up an invalid swift-format configuration file and thus don't set the user-provided options.
115
119
let ws = try await MultiFileTestWorkspace ( files: [
116
120
" .swift-format " : """
@@ -145,6 +149,7 @@ final class FormattingTests: XCTestCase {
145
149
}
146
150
147
151
func testConfigFileInNestedDirectory( ) async throws {
152
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
148
153
// We pick up an invalid swift-format configuration file and thus don't set the user-provided options.
149
154
let ws = try await MultiFileTestWorkspace ( files: [
150
155
" .swift-format " : """
@@ -187,6 +192,7 @@ final class FormattingTests: XCTestCase {
187
192
}
188
193
189
194
func testInvalidConfigurationFile( ) async throws {
195
+ try await SkipUnless . toolchainContainsSwiftFormat ( )
190
196
// We pick up an invalid swift-format configuration file and thus don't set the user-provided options.
191
197
// The swift-format default is 2 spaces.
192
198
let ws = try await MultiFileTestWorkspace ( files: [
0 commit comments