Added test for PolyPressure.

This commit is contained in:
Francois Best 2016-10-08 02:37:18 +02:00
parent 8372ee92d7
commit cb34be646c
1 changed files with 10 additions and 0 deletions

View File

@ -225,7 +225,17 @@ TEST(MidiOutput, sendPitchBend)
TEST(MidiOutput, sendPolyPressure) TEST(MidiOutput, sendPolyPressure)
{ {
SerialMock serial;
MidiInterface midi(serial);
Buffer buffer;
buffer.resize(5);
midi.begin();
midi.sendPolyPressure(42, 12, 12);
midi.sendPolyPressure(47, 12, 12);
EXPECT_EQ(serial.mTxBuffer.getLength(), 5);
serial.mTxBuffer.read(&buffer[0], 5);
EXPECT_THAT(buffer, ElementsAreArray({0xab, 42, 12, 47, 12}));
} }
TEST(MidiOutput, sendAfterTouch) TEST(MidiOutput, sendAfterTouch)