diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2016-10-25 07:39:48 +0200 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2016-10-31 12:47:38 +0000 |
commit | b20254cfae16b5578810f20fa4a42b17a8c05deb (patch) | |
tree | e3285bbaca7648de17d0d442ae612a1f2e4eb4cb /tests | |
parent | 43f33504e186d3fc4c894ba9c179ff849df8be28 (diff) |
QCanBusFrame::toString(): Add one more space around the length field
This limits the three fields CAN-ID, length and data better.
SocketCAN's candump does it this way and with this change
canbusutil get's more compatible to candump.
This function is new in 5.8, so there is no behavior change
for existing code outside Qt.
Change-Id: Ifc26cb7584a572d7aef91763242e7def909a6083
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Andreas Wilhelm <aw@emlix.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qcanbusframe/tst_qcanbusframe.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qcanbusframe/tst_qcanbusframe.cpp b/tests/auto/qcanbusframe/tst_qcanbusframe.cpp index 3a199ec..f8b3781 100644 --- a/tests/auto/qcanbusframe/tst_qcanbusframe.cpp +++ b/tests/auto/qcanbusframe/tst_qcanbusframe.cpp @@ -242,39 +242,39 @@ void tst_QCanBusFrame::tst_toString_data() QTest::newRow("remote request frame") << QCanBusFrame::RemoteRequestFrame << 0x123u << false << QByteArray::fromHex("01") // fake data to get a DLC > 0 - << QString(" 123 [1] Remote Request"); + << QString(" 123 [1] Remote Request"); QTest::newRow("data frame min std id") << QCanBusFrame::DataFrame << 0x0u << false << QByteArray() - << QString(" 000 [0]"); + << QString(" 000 [0]"); QTest::newRow("data frame max std id") << QCanBusFrame::DataFrame << 0x7FFu << false << QByteArray() - << QString(" 7FF [0]"); + << QString(" 7FF [0]"); QTest::newRow("data frame min ext id") << QCanBusFrame::DataFrame << 0x0u << true << QByteArray() - << QString("00000000 [0]"); + << QString("00000000 [0]"); QTest::newRow("data frame max ext id") << QCanBusFrame::DataFrame << 0x1FFFFFFFu << true << QByteArray() - << QString("1FFFFFFF [0]"); + << QString("1FFFFFFF [0]"); QTest::newRow("data frame minimal size") << QCanBusFrame::DataFrame << 0x7FFu << false << QByteArray::fromHex("01") - << QString(" 7FF [1] 01"); + << QString(" 7FF [1] 01"); QTest::newRow("data frame maximal size") << QCanBusFrame::DataFrame << 0x1FFFFFFFu << true << QByteArray::fromHex("0123456789ABCDEF") - << QString("1FFFFFFF [8] 01 23 45 67 89 AB CD EF"); + << QString("1FFFFFFF [8] 01 23 45 67 89 AB CD EF"); QTest::newRow("short data frame FD") << QCanBusFrame::DataFrame << 0x123u << false << QByteArray::fromHex("001122334455667788") - << QString(" 123 [9] 00 11 22 33 44 55 66 77 88"); + << QString(" 123 [9] 00 11 22 33 44 55 66 77 88"); QTest::newRow("long data frame FD") << QCanBusFrame::DataFrame << 0x123u << false << QByteArray::fromHex("00112233445566778899") - << QString(" 123 [10] 00 11 22 33 44 55 66 77 88 99"); + << QString(" 123 [10] 00 11 22 33 44 55 66 77 88 99"); } void tst_QCanBusFrame::tst_toString() |