mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
refs #189 , added sample to test CPqString
This commit is contained in:
@@ -15,6 +15,13 @@ namespace BlackMiscTest
|
|||||||
*/
|
*/
|
||||||
int CSamplesPhysicalQuantities::samples()
|
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
|
// cases which must not work
|
||||||
// CLengthUnit du1(CAngleUnit::rad());
|
// CLengthUnit du1(CAngleUnit::rad());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user