Skip to content

Commit 34c374d

Browse files
committed
Fix tests in Xcode 16.4 on macOS 15.5
1 parent b627e9b commit 34c374d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/SJSAssetExportSessionTests/SJSAssetExportSessionTests.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ final class ExportSessionTests: BaseTests {
4343
#expect(try await videoTrack.load(.naturalSize) == CGSize(width: 1280, height: 720))
4444
#expect(try await videoTrack.load(.nominalFrameRate) == 24.0)
4545
let dataRate = try await videoTrack.load(.estimatedDataRate)
46-
#expect((900_000 ... 1_100_000).contains(dataRate))
46+
#expect((900_000 ... 1_130_000).contains(dataRate))
4747
let videoFormat = try #require(await videoTrack.load(.formatDescriptions).first)
4848
#expect(videoFormat.mediaType == .video)
4949
#expect(videoFormat.mediaSubType == .h264)
@@ -92,7 +92,7 @@ final class ExportSessionTests: BaseTests {
9292
#expect(try await videoTrack.load(.naturalSize) == CGSize(width: 1280, height: 720))
9393
#expect(try await videoTrack.load(.nominalFrameRate) == 24.0)
9494
let dataRate = try await videoTrack.load(.estimatedDataRate)
95-
#expect((900_000 ... 1_100_000).contains(dataRate))
95+
#expect((900_000 ... 1_130_000).contains(dataRate))
9696
let videoFormat = try #require(await videoTrack.load(.formatDescriptions).first)
9797
#expect(videoFormat.mediaType == .video)
9898
#expect(videoFormat.mediaSubType == .h264)
@@ -170,8 +170,10 @@ final class ExportSessionTests: BaseTests {
170170

171171
let exportedAsset = AVURLAsset(url: destinationURL.url)
172172
let videoTrack = try #require(await exportedAsset.sendTracks(withMediaType: .video).first)
173-
#expect(try await videoTrack.load(.naturalSize) == CGSize(width: 1920, height: 1080))
174-
#expect(try await videoTrack.load(.nominalFrameRate) == 30.0)
173+
let naturalSize = try await videoTrack.load(.naturalSize)
174+
#expect(naturalSize == CGSize(width: 1920, height: 1080))
175+
let fps = try await videoTrack.load(.nominalFrameRate)
176+
#expect(Int(fps.rounded()) == 30)
175177
let dataRate = try await videoTrack.load(.estimatedDataRate)
176178
#expect((2_400_000 ... 2_700_000).contains(dataRate))
177179
let videoFormat = try #require(await videoTrack.load(.formatDescriptions).first)

0 commit comments

Comments
 (0)