Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Nov 14, 2024
1 parent 0746cb3 commit 1b340ee
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ final class Timecode_Source_FeetAndFrames_Tests: XCTestCase {
case .fps59_94d, .fps60d:
XCTAssertEqual(ff.feet, 13947, "\(frate)")
XCTAssertEqual(ff.frames, 08, "\(frate)")
case .fps90:
XCTAssertEqual(ff.feet, 20942, "\(frate)")
XCTAssertEqual(ff.frames, 02, "\(frate)")
case .fps95_904, .fps96:
XCTAssertEqual(ff.feet, 22338, "\(frate)")
XCTAssertEqual(ff.frames, 04, "\(frate)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ final class Timecode_Source_FrameCount_Tests: XCTestCase {
case .fps59_94d: 5_178_816
case .fps60: 5_184_000
case .fps60d: 5_178_816
case .fps90: 7_776_000
case .fps95_904: 8_294_400
case .fps96: 8_294_400
case .fps100: 8_640_000
Expand Down Expand Up @@ -123,6 +124,7 @@ final class Timecode_Source_FrameCount_Tests: XCTestCase {
case .fps59_94d: 5_178_816 - 1
case .fps60: 5_184_000 - 1
case .fps60d: 5_178_816 - 1
case .fps90: 7_776_000 - 1
case .fps95_904: 8_294_400 - 1
case .fps96: 8_294_400 - 1
case .fps100: 8_640_000 - 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ final class Timecode_Source_Rational_CMTime_Tests: XCTestCase {
)
case .fps60d:
break // TODO: finish this
case .fps90:
XCTAssertEqual(
try Timecode(.cmTime(CMTime(value: 90000, timescale: 9000)), at: fRate).components,
Timecode.Components(h: 00, m: 00, s: 10, f: 00)
)
case .fps95_904:
break // TODO: finish this
case .fps96:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ final class Timecode_Source_Rational_Tests: XCTestCase {
)
case .fps60d:
break // TODO: finish this
case .fps90:
XCTAssertEqual(
try Timecode(.rational(Fraction(90000, 9000)), at: fRate).components,
Timecode.Components(h: 00, m: 00, s: 10, f: 00)
)
case .fps95_904:
break // TODO: finish this
case .fps96:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ final class Timecode_Source_RealTime_Tests: XCTestCase {
.fps48,
.fps50,
.fps60,
.fps90,
.fps96,
.fps100,
.fps120:
Expand Down Expand Up @@ -173,6 +174,7 @@ final class Timecode_Source_RealTime_Tests: XCTestCase {
.fps48,
.fps50,
.fps60,
.fps90,
.fps96,
.fps100,
.fps120:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ final class Timecode_Source_Samples_Tests: XCTestCase {
.fps48,
.fps50,
.fps60,
.fps90,
.fps96,
.fps100,
.fps120:
Expand Down

0 comments on commit 1b340ee

Please sign in to comment.