Skip to content

Commit e9a3d36

Browse files
authored
Fix tests (#143)
1 parent 21b9cd5 commit e9a3d36

File tree

4 files changed

+7
-32
lines changed

4 files changed

+7
-32
lines changed

.github/workflows/swift.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: macos-13
11+
runs-on: macos-15
1212
strategy:
1313
matrix:
1414
xcode:
15-
- '15.0' # Swift 5.9
15+
- '18.0' # Swift 6
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Build
1919
run: xcodebuild clean build -scheme MagazineLayout -destination "generic/platform=iOS Simulator"
2020
- name: Run tests
21-
run: xcodebuild clean test -project MagazineLayout.xcodeproj -scheme MagazineLayout -destination "name=iPhone 14,OS=17.2"
21+
run: xcodebuild clean test -project MagazineLayout.xcodeproj -scheme MagazineLayout -destination "name=iPhone 16,OS=18.4"

Tests/ModelStateEmptySectionLayoutTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import XCTest
1717

1818
@testable import MagazineLayout
1919

20+
@available(iOS 18.0, *)
2021
final class ModelStateEmptySectionLayoutTests: XCTestCase {
2122

2223
// MARK: Internal

Tests/ModelStateLayoutTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import XCTest
1717

1818
@testable import MagazineLayout
1919

20+
@available(iOS 18.0, *)
2021
final class ModelStateLayoutTests: XCTestCase {
2122

2223
// MARK: Internal

Tests/TestingSupport.swift

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ final class ModelHelpers {
6060

6161
// MARK: - FrameHelpers
6262

63+
@available(iOS 18.0, *)
6364
final class FrameHelpers {
6465

6566
static func expectedFrames(
@@ -187,6 +188,7 @@ final class FrameHelpers {
187188

188189
// MARK: - Remove duplicates
189190

191+
@available(iOS 18.0, *)
190192
extension Array where Element == CGRect {
191193

192194
func removingDuplicates() -> [Element] {
@@ -205,35 +207,6 @@ extension Array where Element == CGRect {
205207

206208
}
207209

208-
// MARK: Hashable
209-
210-
extension CGRect: Hashable {
211-
212-
public func hash(into hasher: inout Hasher) {
213-
hasher.combine(size)
214-
hasher.combine(origin)
215-
}
216-
217-
}
218-
219-
extension CGSize: Hashable {
220-
221-
public func hash(into hasher: inout Hasher) {
222-
hasher.combine(height)
223-
hasher.combine(width)
224-
}
225-
226-
}
227-
228-
extension CGPoint: Hashable {
229-
230-
public func hash(into hasher: inout Hasher) {
231-
hasher.combine(x)
232-
hasher.combine(y)
233-
}
234-
235-
}
236-
237210
// MARK: - DebugHelpers
238211

239212
final class DebugHelpers {

0 commit comments

Comments
 (0)