Explicitly =delete {in}equality operators for CAN parser value calsses
... so that the users could not provide their own implementations and
potentially get an ODR violation.
For unit-tests provide
bool equals(lhs, rhs)
functions instead.
The drawback of this approach is that we need to use
QVERIFY(equals(actual, expected));
QVERIFY(!equals(actual, expected));
instead of
QCOMPARE_EQ(actual, expected);
QCOMPARE_NE(actual, expected);
The former will produce less informative error messages in case of test
failures.
This commit amends 8db3c1142248e4564e8b90db61ad1bdf13164453.
Pick-to: 6.5
Change-Id: I6a476f4af84232e9a31705a633de2a2a0647180f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| commit | 35ca3f143ff464d77c83976add6864bff6824dc1 |
| parent | e6b4b720aabed07a3b6c28b446f1563f464fcc38 |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Thu, 2 Feb 2023 16:55:31 +0100 |
- M src/serialbus/qcanmessagedescription.h
- M src/serialbus/qcansignaldescription.h
- M src/serialbus/qcanuniqueiddescription.h
- M tests/auto/qcandbcfileparser/tst_qcandbcfileparser.cpp
- M tests/auto/qcanmessagedescription/tst_qcanmessagedescription.cpp
- M tests/auto/qcansignaldescription/tst_qcansignaldescription.cpp
- M tests/auto/qcanuniqueiddescription/tst_qcanuniqueiddescription.cpp
- M tests/auto/shared/qcanmessagedescription_helpers.h
- M tests/auto/shared/qcansignaldescription_helpers.h
- M tests/auto/shared/qcanuniqueiddescription_helpers.h