mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Adds an additional test.
This commit is contained in:
parent
e7618bb32e
commit
b32538f3c8
@ -51,4 +51,33 @@
|
||||
XCTAssert(events[8].length == transition_length, "Time taken in transition between speed zones should be half of a bit length in the first part plus half of a bit length in the second");
|
||||
}
|
||||
|
||||
- (void)testComplicatedTrackSeek {
|
||||
std::vector<Storage::Disk::PCMSegment> segments;
|
||||
|
||||
Storage::Disk::PCMSegment sync_segment;
|
||||
sync_segment.data.resize(10);
|
||||
sync_segment.number_of_bits = 10*8;
|
||||
|
||||
Storage::Disk::PCMSegment header_segment;
|
||||
header_segment.data.resize(14);
|
||||
header_segment.number_of_bits = 14*8;
|
||||
|
||||
Storage::Disk::PCMSegment data_segment;
|
||||
data_segment.data.resize(349);
|
||||
data_segment.number_of_bits = 349*8;
|
||||
|
||||
for(std::size_t c = 0; c < 16; ++c) {
|
||||
segments.push_back(sync_segment);
|
||||
segments.push_back(header_segment);
|
||||
segments.push_back(sync_segment);
|
||||
segments.push_back(data_segment);
|
||||
segments.push_back(sync_segment);
|
||||
}
|
||||
|
||||
Storage::Disk::PCMTrack track(segments);
|
||||
Storage::Time late_time(967445, 2045454);
|
||||
track.seek_to(late_time);
|
||||
track.get_next_event();
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user