[poincare/unit] Missing prefix reset

When tuning the representative without tuning the prefix, the prefix
would not be reset to its default value, causing a problem for masses,
whose base prefix depend on the representative (k for grams, none for
the rest).
Fixes a crash when typing sqrt(_N) with country set to US.

Change-Id: Iade900de5fb31e06fdfafef34ae27da3f36983fa
This commit is contained in:
Gabriel Ozouf
2020-09-24 11:06:28 +02:00
committed by Émilie Feral
parent d862d5503c
commit 4e771fdb54
2 changed files with 6 additions and 1 deletions

View File

@@ -536,6 +536,7 @@ QUIZ_CASE(poincare_simplification_units) {
assert_parsed_expression_simplify_to("cos(1_s/1_s)", "cos(1)");
assert_parsed_expression_simplify_to("1_m+π_m+√(2)_m-cos(15)_m", "6.3154941288217×_m");
assert_parsed_expression_simplify_to("√(16×_m^2)", "4×_m");
assert_parsed_expression_simplify_to("1×_A_kg", "2.2046226218488×_A×_lb", User, Radian, Imperial);
}
QUIZ_CASE(poincare_simplification_power) {