Unit test for the issue #485.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-05-07 16:14:43 +03:00
parent 41e842f17a
commit 637ca7015e
2 changed files with 15 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include "tst_misc.h"
#include "../vmisc/def.h"
#include "../vgeometry/vgobject.h"
#include <QtTest>
@ -153,3 +154,15 @@ void TST_Misc::TestCLocale()
QCOMPARE(localized, expected);
}
//---------------------------------------------------------------------------------------------------------------------
void TST_Misc::TestIssue485()
{
const qreal radius = 5.6692913385826778;
const QPointF cPoint(407.9527559055118, 39.999874015748034);
const QPointF sPoint(407.9527559055118, 39.999874015748034);
QPointF p1, p2;
const int res = VGObject::LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), sPoint-cPoint), p1, p2);
QCOMPARE(res, 0);
}

View File

@ -47,6 +47,8 @@ private slots:
void TestCLocale_data();
void TestCLocale();
void TestIssue485();
private:
Q_DISABLE_COPY(TST_Misc)
};