mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-12 12:45:40 +08:00
First major wave of PQ refactoring, including but not limited to:
* Default unit is more clearly stated in one place, not restated in many different places, and is not always the SI unit * Converter strategy pattern in CMeasurementUnit, covering linear, affine, and different kinds of sexagesimal units * General reorganization of CMeasurementUnit construction and CPhysicalQuantity methods, not removing any behvaiour * Move duplicated method unitFromSymbol from derived classes into base class CMeasurementUnit * For DBus, CPhysicalQuantity marshals both in its own unit and in the default unit
This commit is contained in:
@@ -37,11 +37,11 @@ void CTestAviation::headingBasics()
|
||||
QVERIFY2(h4 == h1, "Values shall be equal");
|
||||
|
||||
h1 -= h1;
|
||||
QVERIFY2(h1.unitValueToDouble() == 0, "Value shall be 0");
|
||||
QVERIFY2(h1.value() == 0, "Value shall be 0");
|
||||
|
||||
// h4 = h1 + h2; does not work, because misleading
|
||||
h2 += h2; // add just angle
|
||||
QVERIFY2(h2.unitValueToDouble() == 360, "Value shall be 360");
|
||||
QVERIFY2(h2.value() == 360, "Value shall be 360");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user