mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
Ref T696 Fix number formatting for CTime and CAngle.
- Removed the 'L' in the format strings, so the C locale is used. - Added `1 + digits` to the `fieldWidth`, as this actually includes the decimal point and the digits after it.
This commit is contained in:
committed by
Klaus Basan
parent
a8d2916e9e
commit
6115f7d093
@@ -241,6 +241,11 @@ namespace BlackMiscTest
|
||||
QVERIFY2(CMathUtils::epsilonEqual(t6.value(), 1.0101), "Switching the unit produced a wrong a value");
|
||||
t7.parseFromString("27:30:55");
|
||||
QVERIFY2(t7.formattedHrsMinSec() == "27:30:55", "Parsed time greater than 24h failed");
|
||||
|
||||
CTime t8(7680, CTimeUnit::s());
|
||||
t8.switchUnit(CTimeUnit::hrmin());
|
||||
qDebug() << t8.valueRoundedWithUnit();
|
||||
QVERIFY2(t8.valueRoundedWithUnit() == "02h08.0m", "valueRoundedWithUnit in hrmin correctly formatted");
|
||||
}
|
||||
|
||||
void CTestPhysicalQuantities::accelerationTests()
|
||||
|
||||
Reference in New Issue
Block a user