Skip to content

Commit 0e299cd

Browse files
committed
CoreMedia: add a test for CMTimeRange(start:duration:)
Patch by Adam Sonnanstine. Swift SVN r30540
1 parent 16735a3 commit 0e299cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

validation-test/stdlib/CoreMedia.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ CoreMediaTests.test("CMTime/Comparable") {
4343
checkComparable(instances.map { $0.1 }, oracle: comparisonOracle)
4444
}
4545

46+
CoreMediaTests.test("CMTimeRange(start:duration:)") {
47+
let start = CMTime(seconds: 10.0, preferredTimescale: 600)
48+
let duration = CMTime(seconds: 5.0, preferredTimescale: 600)
49+
let range = CMTimeRange(start: start, duration: duration)
50+
expectEqual(start, range.start)
51+
expectEqual(duration, range.duration)
52+
}
53+
4654
CoreMediaTests.test("CMTimeRange(start:end:)") {
4755
let start = CMTime(seconds: 10.0, preferredTimescale: 600)
4856
let end = CMTime(seconds: 20.0, preferredTimescale: 600)

0 commit comments

Comments
 (0)