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 9f7218ac75
commit 0b3adee2ab
58 changed files with 573 additions and 592 deletions

View File

@@ -44,8 +44,8 @@ protected:
}
Base::Quantity parse_quantity_text_as_quantity(const char* quantity_text) {
auto quantity_qstr = QString::fromStdString(std::string(quantity_text));
auto quantity_result = Base::Quantity::parse(quantity_qstr);
auto quantity_str = std::string(quantity_text);
auto quantity_result = Base::Quantity::parse(quantity_str);
return quantity_result;
}
@@ -95,8 +95,8 @@ TEST_F(ExpressionParserTest, functionPARSEQUANT)
EXPECT_EQ(expression_result, quantity_result) << "mismatch:"
" expression_text='" + std::string(expression_text) + "'"
" quantity_text='" + std::string(quantity_text) + "'"
" expression_representation='" + expression_result.getUserString().toStdString() + "'"
" quantity_representation='" + quantity_result.getUserString().toStdString() + "'"
" expression_representation='" + expression_result.getUserString() + "'"
" quantity_representation='" + quantity_result.getUserString() + "'"
;
}