Add a test for the midistate last velocity

This commit is contained in:
Paul Fd 2021-02-23 01:42:34 +01:00
parent c118ad6cbe
commit d95c70aa68

View file

@ -82,3 +82,11 @@ TEST_CASE("[MidiState] Extended CCs")
sfz::MidiState state;
state.ccEvent(0, 142, 64_norm); // should not trap
}
TEST_CASE("[MidiState] Last note velocity")
{
sfz::MidiState state;
state.noteOnEvent(0, 62, 64_norm);
state.noteOnEvent(0, 60, 10_norm);
REQUIRE(state.getLastVelocity() == 10_norm);
}