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:
Mat Sutcliffe
2019-06-30 23:18:28 +01:00
committed by Klaus Basan
parent a8d2916e9e
commit 6115f7d093
2 changed files with 15 additions and 10 deletions

View File

@@ -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()