mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refs #189 , added sample to test CPqString
This commit is contained in:
@@ -15,6 +15,13 @@ namespace BlackMiscTest
|
||||
*/
|
||||
int CSamplesPhysicalQuantities::samples()
|
||||
{
|
||||
QVariant parsedPq = CPqString::parse("100 km/h");
|
||||
parsedPq = CPqString::parse("-33ft");
|
||||
parsedPq = CPqString::parse("666");
|
||||
CSpeed speedParsed = CPqString::parse<CSpeed>("111.33ft/s");
|
||||
CFrequency frequencyParsed = CPqString::parse<CFrequency>("122.8MHz");
|
||||
qDebug() << "parsed" << speedParsed << speedParsed.valueRoundedWithUnit(2, true) << frequencyParsed << frequencyParsed.valueRoundedWithUnit(2, true);
|
||||
|
||||
// cases which must not work
|
||||
// CLengthUnit du1(CAngleUnit::rad());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user