diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 17:58:23 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 18:11:12 +0100 |
commit | 9f0e49eb1709d297a6811f8a54e3b67f3b8e6a8c (patch) | |
tree | bb4c0c129a9113a0936b52a28a727f8cccf62f4d | |
parent | 42c3e8e103d53172486aec5bb050dbee68dd8a54 (diff) |
PortMidiControllerTest: Fix potential trunction of constant value
QByteArray::append() expects `char`, not `unsigned char`.
Fixes these warnings:
src\test\portmidicontroller_test.cpp(250): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(258): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(286): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(293): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(321): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(326): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(330): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(387): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(394): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(430): warning C4309: 'argument': truncation of constant value
src\test\portmidicontroller_test.cpp(437): warning C4309: 'argument': truncation of constant value
-rw-r--r-- | src/test/portmidicontroller_test.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/test/portmidicontroller_test.cpp b/src/test/portmidicontroller_test.cpp index 3c402cb4bc..61b7af919d 100644 --- a/src/test/portmidicontroller_test.cpp +++ b/src/test/portmidicontroller_test.cpp @@ -247,15 +247,15 @@ TEST_F(PortMidiControllerTest, Poll_Read_SysExWithRealtime) { messages.push_back(MakeEvent(0x000000F7, 0x0)); QByteArray sysex; - sysex.append(0xF0); - sysex.append(0x11); - sysex.append(0x22); - sysex.append(0x33); - sysex.append(0x44); - sysex.append(0x55); - sysex.append(0x66); - sysex.append(0x77); - sysex.append(0xF7); + sysex.append('\xF0'); + sysex.append('\x11'); + sysex.append('\x22'); + sysex.append('\x33'); + sysex.append('\x44'); + sysex.append('\x55'); + sysex.append('\x66'); + sysex.append('\x77'); + sysex.append('\xF7'); Sequence read; EXPECT_CALL(*m_mockInput, isOpen()) @@ -283,14 +283,14 @@ TEST_F(PortMidiControllerTest, Poll_Read_SysEx) { messages.push_back(MakeEvent(0xF7665544, 0x1)); QByteArray sysex; - sysex.append(0xF0); - sysex.append(0x11); - sysex.append(0x22); - sysex.append(0x33); - sysex.append(0x44); - sysex.append(0x55); - sysex.append(0x66); - sysex.append(0xF7); + sysex.append('\xF0'); + sysex.append('\x11'); + sysex.append('\x22'); + sysex.append('\x33'); + sysex.append('\x44'); + sysex.append('\x55'); + sysex.append('\x66'); + sysex.append('\xF7'); Sequence read; EXPECT_CALL(*m_mockInput, isOpen()) @@ -318,16 +318,16 @@ TEST_F(PortMidiControllerTest, messages.push_back(MakeEvent(0x0000F777, 0x0)); QByteArray sysex; - sysex.append(0xF0); - sysex.append(0x11); - sysex.append(0x22); - sysex.append(0x33); - sysex.append(0x44); - sysex.append(0xF8); - sysex.append(0x55); - sysex.append(0x66); - sysex.append(0x77); - sysex.append(0xF7); + sysex.append('\xF0'); + sysex.append('\x11'); + sysex.append('\x22'); + sysex.append('\x33'); + sysex.append('\x44'); + sysex.append('\xF8'); + sysex.append('\x55'); + sysex.append('\x66'); + sysex.append('\x77'); + sysex.append('\xF7'); Sequence read; EXPECT_CALL(*m_mockInput, isOpen()) @@ -384,14 +384,14 @@ TEST_F(PortMidiControllerTest, Poll_Read_SysExInterrupted_FollowedBySysExMessage messages.push_back(MakeEvent(0xF7665544, 0x0)); QByteArray sysex; - sysex.append(0xF0); - sysex.append(0x11); - sysex.append(0x22); - sysex.append(0x33); - sysex.append(0x44); - sysex.append(0x55); - sysex.append(0x66); - sysex.append(0xF7); + sysex.append('\xF0'); + sysex.append('\x11'); + sysex.append('\x22'); + sysex.append('\x33'); + sysex.append('\x44'); + sysex.append('\x55'); + sysex.append('\x66'); + sysex.append('\xF7'); Sequence read; EXPECT_CALL(*m_mockInput, isOpen()) @@ -427,14 +427,14 @@ TEST_F(PortMidiControllerTest, Poll_Read_SysEx_BufferOverflow) { messages3.push_back(MakeEvent(0xF7665544, 0x2)); QByteArray sysex; - sysex.append(0xF0); - sysex.append(0x11); - sysex.append(0x22); - sysex.append(0x33); - sysex.append(0x44); - sysex.append(0x55); - sysex.append(0x66); - sysex.append(0xF7); + sysex.append('\xF0'); + sysex.append('\x11'); + sysex.append('\x22'); + sysex.append('\x33'); + sysex.append('\x44'); + sysex.append('\x55'); + sysex.append('\x66'); + sysex.append('\xF7'); Sequence read; EXPECT_CALL(*m_mockInput, isOpen()) |