From 595cbc44ac0bde3d80e48215a77b56622b412834 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi <dismine@gmail.com> Date: Fri, 11 Nov 2022 20:50:10 +0200 Subject: [PATCH] Decrease accuracy to fix float point issues. --- src/libs/vtest/abstracttest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vtest/abstracttest.cpp b/src/libs/vtest/abstracttest.cpp index a1c6a8ba7..5ca43c614 100644 --- a/src/libs/vtest/abstracttest.cpp +++ b/src/libs/vtest/abstracttest.cpp @@ -250,7 +250,7 @@ void AbstractTest::ComparePaths(const QVector<QPointF> &actual, const QVector<QP QVERIFY2(actual.size() >= 2, "Not enough points"); QVERIFY2(expected.size() >= 2, "Not enough points"); - const qreal accuracy = accuracyPointOnLine*2; + const qreal accuracy = accuracyPointOnLine*4.; QVector<QPointF> actualFilled = FillPath(actual, accuracy); bool onLine = false; @@ -259,7 +259,7 @@ void AbstractTest::ComparePaths(const QVector<QPointF> &actual, const QVector<QP { for(int i = 0; i < expected.size()-1; ++i) { - if (VGObject::IsPointOnLineSegment(p, expected.at(i), expected.at(i+1))) + if (VGObject::IsPointOnLineSegment(p, expected.at(i), expected.at(i+1), accuracyPointOnLine*2.)) { usedEdges.insert(i+1); onLine = true;