From d495b881003aa491a8979f6c56b194151f95680b Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Fri, 21 Sep 2018 17:11:19 -0700 Subject: [PATCH] ICU-20108 Adding tests for compact decimal format in zh-Hant and zh-Hant-HK. --- icu4c/source/test/intltest/numbertest_api.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/icu4c/source/test/intltest/numbertest_api.cpp b/icu4c/source/test/intltest/numbertest_api.cpp index ec8da929244f..78a8d27282de 100644 --- a/icu4c/source/test/intltest/numbertest_api.cpp +++ b/icu4c/source/test/intltest/numbertest_api.cpp @@ -403,6 +403,22 @@ void NumberFormatterApiTest::notationCompact() { 9990000, u"10M"); + assertFormatSingle( + u"Compact in zh-Hant-HK", + u"compact-short", + NumberFormatter::with().notation(Notation::compactShort()), + Locale("zh-Hant-HK"), + 1e7, + u"10M"); + + assertFormatSingle( + u"Compact in zh-Hant", + u"compact-short", + NumberFormatter::with().notation(Notation::compactShort()), + Locale("zh-Hant"), + 1e7, + u"1000\u842C"); + // NOTE: There is no API for compact custom data in C++ // and thus no "Compact Somali No Figure" test }