mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 15:42:14 +00:00
ICU-22463 Fix the conversion from gasoline-equivalent units to kilograms-per-meter-squared-per-second
See #2616
This commit is contained in:
parent
8c4af504a0
commit
c4689841c0
2 changed files with 3 additions and 8 deletions
|
@ -372,11 +372,11 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign
|
|||
factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum;
|
||||
} else if (baseStr == "in3_to_m3") {
|
||||
factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum;
|
||||
factor.factorDen *= 12 * 12 * 12;
|
||||
factor.factorDen *= std::pow(12 * 12 * 12, power * signum);
|
||||
} else if (baseStr == "gal_to_m3") {
|
||||
factor.factorNum *= 231;
|
||||
factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum;
|
||||
factor.factorDen *= 12 * 12 * 12;
|
||||
factor.factorNum *= std::pow(231, power * signum);
|
||||
factor.factorDen *= std::pow(12 * 12 * 12, power * signum);
|
||||
} else if (baseStr == "gal_imp_to_m3") {
|
||||
factor.constantExponents[CONSTANT_GAL_IMP2M3] += power * signum;
|
||||
} else if (baseStr == "G") {
|
||||
|
|
|
@ -449,11 +449,6 @@ void unitsTestDataLineFn(void *context, char *fields[][2], int32_t fieldCount, U
|
|||
StringPiece y = trimField(fields[2]);
|
||||
StringPiece commentConversionFormula = trimField(fields[3]);
|
||||
StringPiece utf8Expected = trimField(fields[4]);
|
||||
StringPiece gasolineEnergyDensity("gasoline-energy-density");
|
||||
|
||||
if ( x.compare(gasolineEnergyDensity) == 0 && unitsTest->logKnownIssue("CLDR-17015", "Problem with gasoline-energy-density unit calculation")) {
|
||||
return;
|
||||
}
|
||||
|
||||
UNumberFormat *nf = unum_open(UNUM_DEFAULT, nullptr, -1, "en_US", nullptr, status);
|
||||
if (status.errIfFailureAndReset("unum_open failed")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue