summaryrefslogtreecommitdiff
path: root/quantum/sequencer/tests
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-07-28 12:01:23 +0100
committerGitHub <noreply@github.com>2021-07-28 12:01:23 +0100
commit03d258c2226959480fc3ead1568ca2fe8ba37c59 (patch)
tree6a5f05f6017ec01ea68883749bc5af0e558a51cf /quantum/sequencer/tests
parentc52c69d45f180e8ab677be4707ea2c8180a14254 (diff)
downloadqmk_firmware-03d258c2226959480fc3ead1568ca2fe8ba37c59.tar.gz
qmk_firmware-03d258c2226959480fc3ead1568ca2fe8ba37c59.zip
matrix_scan_x -> x_task (#13748)
Diffstat (limited to 'quantum/sequencer/tests')
-rw-r--r--quantum/sequencer/tests/sequencer_tests.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/quantum/sequencer/tests/sequencer_tests.cpp b/quantum/sequencer/tests/sequencer_tests.cpp
index e81984e5b5..290605a52a 100644
--- a/quantum/sequencer/tests/sequencer_tests.cpp
+++ b/quantum/sequencer/tests/sequencer_tests.cpp
@@ -386,7 +386,7 @@ void setUpMatrixScanSequencerTest(void) {
TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep) {
setUpMatrixScanSequencerTest();
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, MI_C);
EXPECT_EQ(last_noteoff, 0);
}
@@ -394,7 +394,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep)
TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackSecondTrackAfterFirstTrackOfFirstStep) {
setUpMatrixScanSequencerTest();
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -409,7 +409,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotAttackInactiveTrackFirstSt
// Wait some time after the first track has been attacked
advance_time(SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -423,7 +423,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackThirdTrackAfterSecondTr
// Wait some time after the second track has been attacked
advance_time(2 * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 2);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -438,7 +438,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterReleasePhaseAfterLastTra
// Wait until all notes have been attacked
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
EXPECT_EQ(sequencer_internal_state.current_step, 0);
@@ -458,7 +458,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseBackwards) {
// + the release timeout
advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, SEQUENCER_TRACKS - 2);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_RELEASE);
@@ -476,7 +476,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotReleaseInactiveTrackFirstS
// + the release timeout
advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -495,7 +495,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseFirstTrackFirstStep) {
// + all the other notes have been released
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, MI_C);
}
@@ -514,7 +514,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterPausePhaseAfterRelease)
// + all the other notes have been released
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 0);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_PAUSE);
@@ -536,7 +536,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessFirstTrackOfSecondStep
// + the step duration (one 16th at tempo=120 lasts 125ms)
advance_time(125);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 1);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -548,7 +548,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackTooEarly) {
sequencer_internal_state.current_step = 2;
sequencer_internal_state.current_track = 1;
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -562,7 +562,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackOnTime) {
// Wait until first track has been attacked
advance_time(SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, MI_D);
EXPECT_EQ(last_noteoff, 0);
}
@@ -583,7 +583,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldLoopOnceSequenceIsOver) {
// + the step duration (one 16th at tempo=120 lasts 125ms)
advance_time(125);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);