Skip to content

Commit 4451417

Browse files
chore: clean up SwiftlyTests.swift & use SwiftlyCore.version.major
1 parent e467ab5 commit 4451417

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Tests/SwiftlyTests/SwiftlyTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ struct MockedSwiftlyVersionTrait: TestTrait, TestScoping {
149149
init(_ name: String) { self.name = name }
150150

151151
func provideScope(for _: Test, testCase _: Test.Case?, performing function: @Sendable () async throws -> Void) async throws {
152-
try await SwiftlyTests.withMockedSwiftlyVersion(latestSwiftlyVersion: SwiftlyVersion(major: 1, minor: 0, patch: 0)) {
153-
print("Mocking swiftly version: \(SwiftlyVersion(major: 1, minor: 0, patch: 0)) at \(#file):\(#line)")
154-
152+
try await SwiftlyTests.withMockedSwiftlyVersion(latestSwiftlyVersion: SwiftlyVersion(major: SwiftlyCore.version.major, minor: 0, patch: 0)) {
155153
try await function()
156154
}
157155
}
@@ -356,7 +354,7 @@ public enum SwiftlyTests {
356354

357355
/// Operate with a mocked toolchain that has the provided list of executables in its bin directory.
358356
static func withMockedToolchain(executables: [String]? = nil, f: () async throws -> Void) async throws {
359-
let mockDownloader = MockToolchainDownloader(executables: executables, latestSwiftlyVersion: SwiftlyVersion(major: 1, minor: 0, patch: 0))
357+
let mockDownloader = MockToolchainDownloader(executables: executables)
360358

361359
let ctx = SwiftlyCoreContext(
362360
mockedHomeDir: SwiftlyTests.ctx.mockedHomeDir,

0 commit comments

Comments
 (0)