Make tests work on iOS 18.0 and iOS 18.1

Estimated data rate changes a bit so check against a range instead of
a specific value.
This commit is contained in:
Sami Samhuri 2024-10-24 18:34:11 -07:00
parent 63dc13d316
commit f9bacbe9be
No known key found for this signature in database

View file

@ -80,7 +80,8 @@ final class ExportSessionTests {
let videoTrack = try #require(await exportedAsset.sendTracks(withMediaType: .video).first)
#expect(try await videoTrack.load(.naturalSize) == CGSize(width: 1280, height: 720))
#expect(try await videoTrack.load(.nominalFrameRate) == 24.0)
#expect(try await videoTrack.load(.estimatedDataRate) == 1_036_128)
let dataRate = try await videoTrack.load(.estimatedDataRate)
#expect((1_000_000 ... 1_100_000).contains(dataRate))
let videoFormat = try #require(await videoTrack.load(.formatDescriptions).first)
#expect(videoFormat.mediaType == .video)
#expect(videoFormat.mediaSubType == .h264)
@ -128,7 +129,8 @@ final class ExportSessionTests {
let videoTrack = try #require(await exportedAsset.sendTracks(withMediaType: .video).first)
#expect(try await videoTrack.load(.naturalSize) == CGSize(width: 1280, height: 720))
#expect(try await videoTrack.load(.nominalFrameRate) == 24.0)
#expect(try await videoTrack.load(.estimatedDataRate) == 1_036_128)
let dataRate = try await videoTrack.load(.estimatedDataRate)
#expect((1_000_000 ... 1_100_000).contains(dataRate))
let videoFormat = try #require(await videoTrack.load(.formatDescriptions).first)
#expect(videoFormat.mediaType == .video)
#expect(videoFormat.mediaSubType == .h264)