13 using namespace swift::misc::aviation;
23 void createFromGndFactorNotOnGround();
24 void createFromGndFactorOnGround();
25 void getGroundFactorUnknown();
26 void getGroundFactorOnGround();
27 void getGroundFactorNotOnGround();
30 void CMiscOnGroundInfo::createDefault()
35 QVERIFY2(info.
getOnGround() == COnGroundInfo::OnGroundSituationUnknown,
"Wrong on ground situation");
38 void CMiscOnGroundInfo::createFromGndFactorNotOnGround()
41 QCOMPARE(info.getGroundFactor(), 0.5);
43 QVERIFY2(info.getOnGround() == COnGroundInfo::NotOnGround,
"Wrong on ground situation");
46 void CMiscOnGroundInfo::createFromGndFactorOnGround()
49 QCOMPARE(info.getGroundFactor(), 0.96);
51 QVERIFY2(info.getOnGround() == COnGroundInfo::OnGround,
"Wrong on ground situation");
54 void CMiscOnGroundInfo::getGroundFactorUnknown()
57 QVERIFY2(info.getGroundFactor() == -1,
"Wrong ground factor");
59 QVERIFY2(info.getOnGround() == COnGroundInfo::OnGroundSituationUnknown,
"Wrong on ground situation");
62 void CMiscOnGroundInfo::getGroundFactorOnGround()
65 QVERIFY2(info.getGroundFactor() == 1,
"Wrong ground factor");
67 QVERIFY2(info.getOnGround() == COnGroundInfo::OnGround,
"Wrong on ground situation");
70 void CMiscOnGroundInfo::getGroundFactorNotOnGround()
73 QVERIFY2(info.getGroundFactor() == 0,
"Wrong ground factor");
75 QVERIFY2(info.getOnGround() == COnGroundInfo::NotOnGround,
"Wrong on ground situation");
82 #include "testongroundinfo.moc"
Aviation classes basic tests.
Information about the ground status.
@ InFromNetwork
received from network
@ OnGroundByInterpolation
strongest for remote aircraft
@ NotSetGroundDetails
not set or unknown if correct (e.g.
double getGroundFactor() const
Get the ground factor Use this for interpolation only!! For just checking if the info is OnGround or ...
IsOnGround getOnGround() const
Is on ground?
OnGroundDetails getGroundDetails() const
Get ground details.
#define SWIFTTEST_APPLESS_MAIN(TestObject)
Implements a main() function that executes all tests in TestObject without instantiating a QApplicati...