mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Issue #22 Error when FL doesn't end in 0 or 5 should be warning
This commit is contained in:
@@ -72,6 +72,8 @@ namespace BlackMiscTest
|
||||
CAltitude a;
|
||||
a.parseFromFpAltitudeString("FL125");
|
||||
QVERIFY2(a == CAltitude(12500, CAltitude::FlightLevel, CLengthUnit::ft()), "Wrong altitude FL125");
|
||||
a.parseFromFpAltitudeString("FL126");
|
||||
QVERIFY2(a == CAltitude(12600, CAltitude::FlightLevel, CLengthUnit::ft()), "Wrong altitude FL126");
|
||||
a.parseFromFpAltitudeString("A122");
|
||||
QVERIFY2(a == CAltitude(12200, CAltitude::MeanSeaLevel, CLengthUnit::ft()), "Wrong altitude A122");
|
||||
a.parseFromFpAltitudeString("123ft");
|
||||
@@ -87,8 +89,6 @@ namespace BlackMiscTest
|
||||
CAltitude faulty(a);
|
||||
faulty.makeNegative();
|
||||
QVERIFY2(!faulty.isValidFpAltitude(), "Negative values not allowed");
|
||||
faulty.parseFromFpAltitudeString("FL111");
|
||||
QVERIFY2(!faulty.isValidFpAltitude(), "FL should end with 0/5");
|
||||
|
||||
// as string
|
||||
a = CAltitude(12500, CAltitude::FlightLevel, CLengthUnit::ft());
|
||||
|
||||
Reference in New Issue
Block a user