Fix shadowing warnings.
This commit is contained in:
parent
7d6cd37ec3
commit
cfffdbea26
|
|
@ -165,10 +165,10 @@ TEST(MidiInput, inputDisabled)
|
||||||
TEST(MidiInput, multiByteParsing)
|
TEST(MidiInput, multiByteParsing)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<false, false> Settings;
|
typedef VariableSettings<false, false> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> MultiByteMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
MultiByteMidiInterface midi(serial);
|
||||||
static const unsigned rxSize = 3;
|
static const unsigned rxSize = 3;
|
||||||
static const byte rxData[rxSize] = { 0x9b, 12, 34 };
|
static const byte rxData[rxSize] = { 0x9b, 12, 34 };
|
||||||
midi.begin(12);
|
midi.begin(12);
|
||||||
|
|
@ -486,11 +486,11 @@ TEST(MidiInput, afterTouchChannel)
|
||||||
TEST(MidiInput, sysExWithinBufferSize)
|
TEST(MidiInput, sysExWithinBufferSize)
|
||||||
{
|
{
|
||||||
typedef VariableSysExSettings<1024> Settings;
|
typedef VariableSysExSettings<1024> Settings;
|
||||||
typedef test_mocks::SerialMock<2048> SerialMock;
|
typedef test_mocks::SerialMock<2048> LargerSerialMock;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<LargerSerialMock, Settings> LargerMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
LargerSerialMock serial;
|
||||||
MidiInterface midi(serial);
|
LargerMidiInterface midi(serial);
|
||||||
|
|
||||||
// Short Frame < 256
|
// Short Frame < 256
|
||||||
{
|
{
|
||||||
|
|
@ -553,10 +553,10 @@ TEST(MidiInput, sysExWithinBufferSize)
|
||||||
TEST(MidiInput, sysExOverBufferSize)
|
TEST(MidiInput, sysExOverBufferSize)
|
||||||
{
|
{
|
||||||
typedef VariableSysExSettings<8> Settings;
|
typedef VariableSysExSettings<8> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> SmallMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
SmallMidiInterface midi(serial);
|
||||||
|
|
||||||
static const unsigned frameLength = 15;
|
static const unsigned frameLength = 15;
|
||||||
static const byte frame[frameLength] = {
|
static const byte frame[frameLength] = {
|
||||||
|
|
@ -907,10 +907,10 @@ TEST(MidiInput, strayUndefinedOneByteParsing)
|
||||||
TEST(MidiInput, strayUndefinedMultiByteParsing)
|
TEST(MidiInput, strayUndefinedMultiByteParsing)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<false, false> Settings;
|
typedef VariableSettings<false, false> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> MultiByteMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
MultiByteMidiInterface midi(serial);
|
||||||
|
|
||||||
static const unsigned rxSize = 4;
|
static const unsigned rxSize = 4;
|
||||||
static const byte rxData[rxSize] = {
|
static const byte rxData[rxSize] = {
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@ TEST(MidiOutput, sendGenericSingle)
|
||||||
TEST(MidiOutput, sendGenericWithRunningStatus)
|
TEST(MidiOutput, sendGenericWithRunningStatus)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<true, false> Settings;
|
typedef VariableSettings<true, false> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> RsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
RsMidiInterface midi(serial);
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
buffer.resize(5);
|
buffer.resize(5);
|
||||||
|
|
||||||
|
|
@ -74,10 +74,10 @@ TEST(MidiOutput, sendGenericWithRunningStatus)
|
||||||
TEST(MidiOutput, sendGenericWithoutRunningStatus)
|
TEST(MidiOutput, sendGenericWithoutRunningStatus)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<false, true> Settings; // No running status
|
typedef VariableSettings<false, true> Settings; // No running status
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> NoRsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
NoRsMidiInterface midi(serial);
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
buffer.resize(6);
|
buffer.resize(6);
|
||||||
|
|
||||||
|
|
@ -301,12 +301,11 @@ TEST(MidiOutput, sendAfterTouchPoly)
|
||||||
|
|
||||||
TEST(MidiOutput, sendSysEx)
|
TEST(MidiOutput, sendSysEx)
|
||||||
{
|
{
|
||||||
typedef test_mocks::SerialMock<1024> SerialMock;
|
typedef test_mocks::SerialMock<1024> LargeSerialMock;
|
||||||
typedef midi::MidiInterface<SerialMock> MidiInterface;
|
typedef midi::MidiInterface<LargeSerialMock> LargeMidiInterface;
|
||||||
|
|
||||||
|
LargeSerialMock serial;
|
||||||
SerialMock serial;
|
LargeMidiInterface midi(serial);
|
||||||
MidiInterface midi(serial);
|
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
// Short frame
|
// Short frame
|
||||||
|
|
@ -510,11 +509,11 @@ TEST(MidiOutput, sendRealTime)
|
||||||
TEST(MidiOutput, RPN)
|
TEST(MidiOutput, RPN)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<true, true> Settings;
|
typedef VariableSettings<true, true> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> RsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
RsMidiInterface midi(serial);
|
||||||
std::vector<test_mocks::uint8> buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
// 14-bit Value Single Frame
|
// 14-bit Value Single Frame
|
||||||
{
|
{
|
||||||
|
|
@ -626,11 +625,11 @@ TEST(MidiOutput, RPN)
|
||||||
TEST(MidiOutput, NRPN)
|
TEST(MidiOutput, NRPN)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<true, true> Settings;
|
typedef VariableSettings<true, true> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> RsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
RsMidiInterface midi(serial);
|
||||||
std::vector<test_mocks::uint8> buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
// 14-bit Value Single Frame
|
// 14-bit Value Single Frame
|
||||||
{
|
{
|
||||||
|
|
@ -741,13 +740,12 @@ TEST(MidiOutput, NRPN)
|
||||||
|
|
||||||
TEST(MidiOutput, runningStatusCancellation)
|
TEST(MidiOutput, runningStatusCancellation)
|
||||||
{
|
{
|
||||||
typedef test_mocks::SerialMock<32> SerialMock;
|
|
||||||
typedef VariableSettings<true, false> Settings;
|
typedef VariableSettings<true, false> Settings;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> RsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
RsMidiInterface midi(serial);
|
||||||
std::vector<test_mocks::uint8> buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
static const unsigned sysExLength = 13;
|
static const unsigned sysExLength = 13;
|
||||||
static const byte sysEx[sysExLength] = {
|
static const byte sysEx[sysExLength] = {
|
||||||
|
|
@ -834,7 +832,6 @@ TEST(MidiOutput, runningStatusCancellation)
|
||||||
0xf6,
|
0xf6,
|
||||||
0x90, 12, 34
|
0x90, 12, 34
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END_UNNAMED_NAMESPACE
|
END_UNNAMED_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -275,12 +275,11 @@ TEST(MidiThru, differentChannelOmni) // Acts like off
|
||||||
|
|
||||||
TEST(MidiThru, multiByteThru)
|
TEST(MidiThru, multiByteThru)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<false, false> Settings;
|
typedef VariableSettings<false, false> MultiByteParsing;
|
||||||
typedef test_mocks::SerialMock<32> SerialMock;
|
typedef midi::MidiInterface<SerialMock, MultiByteParsing> MultiByteMidiInterface;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
MultiByteMidiInterface midi(serial);
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
midi.begin(MIDI_CHANNEL_OMNI);
|
midi.begin(MIDI_CHANNEL_OMNI);
|
||||||
|
|
@ -307,10 +306,10 @@ TEST(MidiThru, withTxRunningStatus)
|
||||||
{
|
{
|
||||||
typedef VariableSettings<true, true> Settings;
|
typedef VariableSettings<true, true> Settings;
|
||||||
typedef test_mocks::SerialMock<32> SerialMock;
|
typedef test_mocks::SerialMock<32> SerialMock;
|
||||||
typedef midi::MidiInterface<SerialMock, Settings> MidiInterface;
|
typedef midi::MidiInterface<SerialMock, Settings> RsMidiInterface;
|
||||||
|
|
||||||
SerialMock serial;
|
SerialMock serial;
|
||||||
MidiInterface midi(serial);
|
RsMidiInterface midi(serial);
|
||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
|
|
||||||
midi.begin(MIDI_CHANNEL_OMNI);
|
midi.begin(MIDI_CHANNEL_OMNI);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue