Skip to content

Commit

Permalink
Update tests to only use swift-testing in 6.0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
plemarquand committed Jun 14, 2024
1 parent bee8ce3 commit 2074648
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.10
// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class MixedXCTestSuite: XCTestCase {
}
}

#if swift(>=5.10)
#if swift(>=6.0)
import Testing

@Test func topLevelTestPassing() {}
Expand Down
12 changes: 12 additions & 0 deletions test/suite/testexplorer/TestExplorerIntegration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ suite("Test Explorer Suite", function () {

const testItems = tests.map(test => {
const testItem = getTestItem(controller, test);
if (!testItem) {
const testsInController: string[] = [];
controller.items.forEach(item => {
testsInController.push(
`${item.id}: ${item.label} ${item.error ? `(error: ${item.error})` : ""}`
);
});

assert.fail(
`Unable to find ${test} in Test Controller. Items in test controller are: ${testsInController.join(", ")}`
);
}
assert.ok(testItem);
return testItem;
});
Expand Down

0 comments on commit 2074648

Please sign in to comment.