Skip to content

Commit f91d65c

Browse files
committed
Test original behavior too
1 parent 65d4203 commit f91d65c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/AudioKitEXTests/SequencerTrackTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ class SequencerTrackTests: XCTestCase {
131131

132132
XCTAssertEqual(track.length, 4, "Track length shouldn't be extended with chord duration less than existing track length")
133133

134+
track.add(noteNumber: 60, position: 0.0, duration: 1.0)
135+
track.add(noteNumber: 60, position: 1.0, duration: 1.0)
136+
track.add(noteNumber: 60, position: 2.0, duration: 1.0)
137+
track.add(noteNumber: 60, position: 3.0, duration: 1.0)
138+
139+
XCTAssertEqual(track.length, 4.01, "Track length should be extended with note event position + duration greater or equal to existing track length")
140+
134141
track.playFromStart()
135142
XCTAssertTrue(track.isPlaying)
136143
let audio = engine.startTest(totalDuration: 5.0)

0 commit comments

Comments
 (0)