Base: restore output format of imperial fraction units
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
This commit is contained in:
@@ -315,20 +315,24 @@ TEST_F(SchemaTest, imperial_building_special_function_length_foot)
|
||||
EXPECT_EQ(result, expect);
|
||||
}
|
||||
|
||||
/*
|
||||
* QuantityParser::yyparse() is crashing on the >>1' 2" + 1/4"<< input,
|
||||
* so disable this test
|
||||
TEST_F(SchemaTest, imperial_building_special_function_length)
|
||||
{
|
||||
constexpr auto val {360.6};
|
||||
const auto result = set("ImperialBuilding", Unit::Length, val);
|
||||
const auto expect = Tools::escapeQuotesFromString("1'2-1/4\"");
|
||||
const auto expect = Tools::escapeQuotesFromString("1' 2\" + 1/4\"");
|
||||
|
||||
EXPECT_EQ(result, expect);
|
||||
}
|
||||
*/
|
||||
|
||||
TEST_F(SchemaTest, imperial_building_special_function_length_neg)
|
||||
{
|
||||
constexpr auto val {-360.6};
|
||||
const auto result = set("ImperialBuilding", Unit::Length, val);
|
||||
const auto expect = Tools::escapeQuotesFromString("-1'2-1/4\"");
|
||||
const auto expect = Tools::escapeQuotesFromString("-1' 2\" - 1/4\"");
|
||||
|
||||
EXPECT_EQ(result, expect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user