mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #197, unit test and preliminary fix for nullUnit comparison
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "testvariantandmap.h"
|
||||
#include "blackmisc/avatcstation.h"
|
||||
#include "blackmisc/valuemap.h"
|
||||
#include "blackmisc/tuple.h"
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
@@ -39,8 +40,16 @@ namespace BlackMiscTest
|
||||
geoPos, CLength(100, CLengthUnit::km()), false, dtFrom2, dtUntil2);
|
||||
|
||||
// compare
|
||||
CLength l1(0, CLengthUnit::nullUnit());
|
||||
CLength l2(0, CLengthUnit::nullUnit());
|
||||
QVERIFY2(l1 == l2, "Null lengths should be equal");
|
||||
|
||||
QVariant station1qv = QVariant::fromValue(station1);
|
||||
QVERIFY2(station1 == station1, "Station should be equal");
|
||||
|
||||
QVERIFY(station1.getController() == station2.getController());
|
||||
QVERIFY(station1.getDistanceToPlane() == station2.getDistanceToPlane());
|
||||
|
||||
QVERIFY2(station1 == station2, "Station should be equal");
|
||||
QVERIFY2(station1 != station3, "Station should not be equal");
|
||||
QVERIFY2(station1qv == station1, "Station should be equal (QVariant)");
|
||||
|
||||
Reference in New Issue
Block a user