mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-11 20:29:47 +08:00
refs #212,improved tests and samples
This commit is contained in:
@@ -197,6 +197,18 @@ namespace BlackMiscTest
|
||||
delete a;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parsing tests
|
||||
*/
|
||||
void CTestPhysicalQuantities::parserTests()
|
||||
{
|
||||
QVERIFY2(CLength(33.0, CLengthUnit::ft()) == CLength("33.0 ft"), "Length");
|
||||
QVERIFY2(CLength(33.0, CLengthUnit::ft()) != CLength("33.1 ft"), "Length !=");
|
||||
QVERIFY2(CLength(-22.8, CLengthUnit::ft()) != CLength("-22.8 cm"), "Length !=");
|
||||
QVERIFY2(CSpeed(123.45, CSpeedUnit::km_h()) == CSpeed("123.45km/h"), "Speed");
|
||||
QVERIFY2(CMass(33.45, CMassUnit::kg()) == CMass("33.45000 kg"), "CMass");
|
||||
}
|
||||
|
||||
/*
|
||||
* Some very basic arithmetic tests on the PQs
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user