Base: Quantity: return std::string

This commit is contained in:
Ladislav Michl
2024-07-13 13:07:27 +02:00
committed by Yorik van Havre
parent c11b37e312
commit 2ea8a633ac
58 changed files with 573 additions and 592 deletions

View File

@@ -32,19 +32,19 @@ private Q_SLOTS:
void test_SimpleBaseUnit() // NOLINT
{
auto result = qsb->valueFromText("1mm");
QCOMPARE(result, Base::Quantity(1, QLatin1String("mm")));
QCOMPARE(result, Base::Quantity(1, "mm"));
}
void test_UnitInNumerator() // NOLINT
{
auto result = qsb->valueFromText("1mm/10");
QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm")));
QCOMPARE(result, Base::Quantity(0.1, "mm"));
}
void test_UnitInDenominator() // NOLINT
{
auto result = qsb->valueFromText("1/10mm");
QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm")));
QCOMPARE(result, Base::Quantity(0.1, "mm"));
}
void test_KeepFormat() // NOLINT