mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Fixed output of PQ null values
This commit is contained in:
committed by
Mathew Sutcliffe
parent
1522c8175e
commit
e49f9c2b38
@@ -28,9 +28,10 @@ using namespace BlackCore;
|
||||
//! main
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication(argc, argv);
|
||||
QCoreApplication qa(argc, argv);
|
||||
CApplication a;
|
||||
Q_UNUSED(a);
|
||||
Q_UNUSED(qa);
|
||||
|
||||
QTextStream out(stdout, QIODevice::WriteOnly);
|
||||
CSamplesPhysicalQuantities::samples(out);
|
||||
|
||||
@@ -58,6 +58,10 @@ namespace BlackSample
|
||||
l3 = l3 * 2;
|
||||
out << "doubled l3: " << l3 << endl;
|
||||
|
||||
// null test
|
||||
CLength nullLength(0, CLengthUnit::nullUnit());
|
||||
out << "Null PQ: " << nullLength << " converted " << nullLength.valueRoundedWithUnit(CLengthUnit::m(), 2) << endl;
|
||||
|
||||
// more tests
|
||||
CFrequency f1(1E6, CFrequencyUnit::Hz()); // 1MHz
|
||||
out << f1 << " " << f1.valueRoundedWithUnit(CFrequencyUnit::MHz()) << " " << f1.valueRoundedWithUnit(CFrequencyUnit::GHz(), 3);
|
||||
|
||||
Reference in New Issue
Block a user