mirror of
https://gitee.com/openharmony/global_i18n
synced 2025-02-22 00:50:49 +00:00
commit
5e7e2289ef
@ -117,7 +117,8 @@ void NumberFormat::InitProperties()
|
||||
}
|
||||
}
|
||||
if (!styleString.empty() && styleString == "percent") {
|
||||
numberFormat = numberFormat.unit(icu::NoUnit::percent());
|
||||
numberFormat = numberFormat.unit(icu::NoUnit::percent()).scale(icu::number::Scale::powerOfTen(2)).precision(
|
||||
icu::number::Precision::fixedFraction(0));
|
||||
}
|
||||
if (!styleString.empty() && styleString == "unit") {
|
||||
for (icu::MeasureUnit curUnit : unitArray) {
|
||||
|
@ -282,7 +282,7 @@ HWTEST_F(IntlTest, IntlFuncTest007, TestSize.Level1)
|
||||
HWTEST_F(IntlTest, IntlFuncTest008, TestSize.Level1)
|
||||
{
|
||||
string locale = "en-CN";
|
||||
string expects = "0,123,456.79%";
|
||||
string expects = "12,345,678.9%";
|
||||
vector<string> locales;
|
||||
locales.push_back(locale);
|
||||
string minimumIntegerDigits = "7";
|
||||
|
Loading…
x
Reference in New Issue
Block a user