Skip to content

Commit

Permalink
Merge pull request #44 from SwiftPackageIndex/drop-5.7
Browse files Browse the repository at this point in the history
Drop 5.7
  • Loading branch information
finestructure authored Jun 7, 2024
2 parents 5185951 + b192831 commit 7b8d2fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion Sources/SPIManifest/SwiftVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public typealias ShortVersion = String


public enum SwiftVersion: ShortVersion, Codable, CaseIterable {
case v5_7 = "5.7"
case v5_8 = "5.8"
case v5_9 = "5.9"
case v5_10 = "5.10"
Expand Down
5 changes: 2 additions & 3 deletions Tests/SPIManifestTests/ManifestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,14 @@ class ManifestTests: XCTestCase {
documentation_targets:
- t2
- platform: watchos
swift_version: 5.7
swift_version: 5.8
documentation_targets:
- t3
"""
)

// MUT
XCTAssertEqual(m.documentationTargets(platform: .watchOS, swiftVersion: .v5_7), ["t3"])
XCTAssertEqual(m.documentationTargets(platform: .macosSpm, swiftVersion: .v5_8), nil)
XCTAssertEqual(m.documentationTargets(platform: .watchOS, swiftVersion: .v5_8), ["t3"])
XCTAssertEqual(m.documentationTargets(platform: .macosSpm, swiftVersion: .v5_9), nil)
XCTAssertEqual(m.documentationTargets(platform: .macosSpm, swiftVersion: .v5_10), ["t0"])
XCTAssertEqual(m.documentationTargets(platform: .watchOS, swiftVersion: .v5_9), nil)
Expand Down
4 changes: 2 additions & 2 deletions Tests/SPIManifestTests/SwiftVersionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ class SwiftVersionTests: XCTestCase {
}

func test_isLatestRelease() throws {
XCTAssertEqual(SwiftVersion.v5_7.isLatestRelease, false)
XCTAssertEqual(SwiftVersion.v5_8.isLatestRelease, false)
XCTAssertEqual(SwiftVersion.v5_9.isLatestRelease, false)
XCTAssertEqual(SwiftVersion.v5_10.isLatestRelease, true)
XCTAssertEqual(SwiftVersion.v6_0.isLatestRelease, false)
}

func test_Comparable() throws {
XCTAssert(SwiftVersion.v6_0 > .v5_10)
XCTAssert(SwiftVersion.v5_10 > .v5_9)
XCTAssert(SwiftVersion.v5_9 > .v5_8)
XCTAssert(SwiftVersion.v5_8 > .v5_7)
}

}

0 comments on commit 7b8d2fe

Please sign in to comment.