Commit 07fbabc6 authored by Andreas Bircher's avatar Andreas Bircher

adding unit test to check waypoint addition for turnaround

parent d092e850
......@@ -137,6 +137,14 @@ void ComplexMissionItemTest::_testAddPolygonCoordinate(void)
for (int i=0; i<polyList.count(); i++) {
QCOMPARE(polyList[i].value<QGeoCoordinate>(), _polyPoints[i]);
}
// Test that number of waypoints is doubled when using turnaround waypoints
_complexItem->setTurnaroundDist(60.0);
QVariantList gridPoints = _complexItem->gridPoints();
_complexItem->setTurnaroundDist(0.0);
QVariantList gridPointsNoT = _complexItem->gridPoints();
QCOMPARE(gridPoints.count(), 2 * gridPointsNoT.count());
}
void ComplexMissionItemTest::_testClearPolygon(void)
......
......@@ -83,6 +83,7 @@ public:
void setDirty (bool dirty) final;
void setCoordinate (const QGeoCoordinate& coordinate) final;
void setSequenceNumber (int sequenceNumber) final;
void setTurnaroundDist (double dist) { _turnaroundDistFact.setRawValue(dist); }
void save (QJsonObject& saveObject) const final;
signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment