Skip to content

Commit 2074648

Browse files
committed
Update tests to only use swift-testing in 6.0
Swift testing recently dropped support for Swift 5.10 in swiftlang/swift-testing#467 Our tests were only runing swift-testing tests in 6.0 and up, but the test project was configured to include it as a dependency with 5.10. Bump this up to 6.0.
1 parent bee8ce3 commit 2074648

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.10
1+
// swift-tools-version:6.0
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

assets/test/defaultPackage/Tests/PackageTests/PackageTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class MixedXCTestSuite: XCTestCase {
2424
}
2525
}
2626

27-
#if swift(>=5.10)
27+
#if swift(>=6.0)
2828
import Testing
2929

3030
@Test func topLevelTestPassing() {}

test/suite/testexplorer/TestExplorerIntegration.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ suite("Test Explorer Suite", function () {
6262

6363
const testItems = tests.map(test => {
6464
const testItem = getTestItem(controller, test);
65+
if (!testItem) {
66+
const testsInController: string[] = [];
67+
controller.items.forEach(item => {
68+
testsInController.push(
69+
`${item.id}: ${item.label} ${item.error ? `(error: ${item.error})` : ""}`
70+
);
71+
});
72+
73+
assert.fail(
74+
`Unable to find ${test} in Test Controller. Items in test controller are: ${testsInController.join(", ")}`
75+
);
76+
}
6577
assert.ok(testItem);
6678
return testItem;
6779
});

0 commit comments

Comments
 (0)