Skip to content

Commit be8683b

Browse files
committed
No Testing on Swift < 6.0
1 parent e0b36b5 commit be8683b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: assets/test/diagnostics/Sources/main.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ repeat {
1313
print(line ?? "nil")
1414
} while line != nil;
1515

16+
#if swift(>=6.0)
1617
import Testing
17-
#expect(try myFunc() != 0)
18+
#expect(try myFunc() != 0)
19+
#endif

Diff for: test/integration-tests/DiagnosticsManager.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ suite("DiagnosticsManager Test Suite", async function () {
178178
// Should have parsed correct severity
179179
assertHasDiagnostic(mainUri, expectedWarningDiagnostic);
180180
assertHasDiagnostic(mainUri, expectedMainErrorDiagnostic);
181-
assertHasDiagnostic(mainUri, expectedMacroDiagnostic);
181+
if (workspaceContext.swiftVersion.isGreaterThanOrEqual(new Version(6, 0, 0))) {
182+
assertHasDiagnostic(mainUri, expectedMacroDiagnostic);
183+
}
182184
// Check parsed for other file
183185
assertHasDiagnostic(funcUri, expectedFuncErrorDiagnostic);
184186
}).timeout(2 * 60 * 1000); // Allow 2 minutes to build
@@ -201,7 +203,9 @@ suite("DiagnosticsManager Test Suite", async function () {
201203
// Should have parsed severity
202204
assertHasDiagnostic(mainUri, expectedWarningDiagnostic);
203205
assertHasDiagnostic(mainUri, expectedMainErrorDiagnostic);
204-
assertHasDiagnostic(mainUri, expectedMacroDiagnostic);
206+
if (workspaceContext.swiftVersion.isGreaterThanOrEqual(new Version(6, 0, 0))) {
207+
assertHasDiagnostic(mainUri, expectedMacroDiagnostic);
208+
}
205209
// Check parsed for other file
206210
assertHasDiagnostic(funcUri, expectedFuncErrorDiagnostic);
207211
}).timeout(2 * 60 * 1000); // Allow 2 minutes to build

0 commit comments

Comments
 (0)