mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-21659 Adding test for exabyte
This commit is contained in:
parent
e4e2ae9544
commit
4c35e59bdc
2 changed files with 42 additions and 0 deletions
|
@ -1130,6 +1130,27 @@ void NumberFormatterApiTest::unitArbitraryMeasureUnits() {
|
|||
2.4,
|
||||
u"2.4 Kim");
|
||||
|
||||
assertFormatSingle(
|
||||
u"Extra-large prefix: exabyte",
|
||||
u"unit/exabyte",
|
||||
u"unit/exabyte",
|
||||
NumberFormatter::with()
|
||||
.unit(MeasureUnit::forIdentifier("exabyte", status)),
|
||||
Locale("en-GB"),
|
||||
2.4,
|
||||
u"2.4 Ebyte");
|
||||
|
||||
assertFormatSingle(
|
||||
u"Extra-large prefix: exabyte (full-name)",
|
||||
u"unit/exabyte unit-width-full-name",
|
||||
u"unit/exabyte unit-width-full-name",
|
||||
NumberFormatter::with()
|
||||
.unit(MeasureUnit::forIdentifier("exabyte", status))
|
||||
.unitWidth(UNUM_UNIT_WIDTH_FULL_NAME),
|
||||
Locale("en-GB"),
|
||||
2.4,
|
||||
u"2.4 exabytes");
|
||||
|
||||
assertFormatSingle(
|
||||
u"SI prefix falling back to root: microohm",
|
||||
u"unit/microohm",
|
||||
|
|
|
@ -1083,6 +1083,27 @@ public class NumberFormatterApiTest extends TestFmwk {
|
|||
NumberFormatter.with().unit(MeasureUnit.forIdentifier("kibimeter")),
|
||||
new ULocale("en-GB"), 2.4, "2.4 Kim");
|
||||
|
||||
assertFormatSingle(
|
||||
"Extra-large prefix: exabyte",
|
||||
"unit/exabyte",
|
||||
"unit/exabyte",
|
||||
NumberFormatter.with()
|
||||
.unit(MeasureUnit.forIdentifier("exabyte")),
|
||||
new ULocale("en-GB"),
|
||||
2.4,
|
||||
"2.4 Ebyte");
|
||||
|
||||
assertFormatSingle(
|
||||
"Extra-large prefix: exabyte (full-name)",
|
||||
"unit/exabyte unit-width-full-name",
|
||||
"unit/exabyte unit-width-full-name",
|
||||
NumberFormatter.with()
|
||||
.unit(MeasureUnit.forIdentifier("exabyte"))
|
||||
.unitWidth(UnitWidth.FULL_NAME),
|
||||
new ULocale("en-GB"),
|
||||
2.4,
|
||||
"2.4 exabytes");
|
||||
|
||||
assertFormatSingle("SI prefix falling back to root: microohm", "unit/microohm", "unit/microohm",
|
||||
NumberFormatter.with().unit(MeasureUnit.forIdentifier("microohm")),
|
||||
new ULocale("de-CH"), 2.4, "2.4 μΩ");
|
||||
|
|
Loading…
Add table
Reference in a new issue