From a1ea9a2e10c8768887651f27bfa8478be9178846 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 5 Jan 2020 19:15:00 +0100 Subject: [PATCH] Fixed unit test warnings as discussed, see https://discordapp.com/channels/539048679160676382/539925070550794240/663426372651319336 --- tests/blackmisc/aviation/testaviation/testaviation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/blackmisc/aviation/testaviation/testaviation.cpp b/tests/blackmisc/aviation/testaviation/testaviation.cpp index 5180ec686..9857e4814 100644 --- a/tests/blackmisc/aviation/testaviation/testaviation.cpp +++ b/tests/blackmisc/aviation/testaviation/testaviation.cpp @@ -91,8 +91,10 @@ namespace BlackMiscTest QVERIFY2(a1 > h3, "200deg are more than 181deg"); QVERIFY2(h4 == h1, "Values shall be equal"); - h1 -= h1; - QCOMPARE(h1.value() + 1, 1.0); + const CHeading copy(h1); + h1 -= copy; + QVERIFY2(h1.isZeroEpsilonConsidered(), "Expect zero value"); + QCOMPARE(h1.value(), 0.0); // h4 = h1 + h2; does not work, because misleading h2 += h2; // add just angle