diff --git a/icu4c/source/common/ucurr.cpp b/icu4c/source/common/ucurr.cpp index f478d8094ff..309b86e0ae4 100644 --- a/icu4c/source/common/ucurr.cpp +++ b/icu4c/source/common/ucurr.cpp @@ -1963,6 +1963,7 @@ static const struct CurrencyList { {"UYI", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, {"UYP", UCURR_COMMON|UCURR_DEPRECATED}, {"UYU", UCURR_COMMON|UCURR_NON_DEPRECATED}, + {"UYW", UCURR_UNCOMMON|UCURR_NON_DEPRECATED}, {"UZS", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"VEB", UCURR_COMMON|UCURR_DEPRECATED}, {"VEF", UCURR_COMMON|UCURR_NON_DEPRECATED}, diff --git a/icu4c/source/test/cintltst/currtest.c b/icu4c/source/test/cintltst/currtest.c index 514278ad588..e35333d320c 100644 --- a/icu4c/source/test/cintltst/currtest.c +++ b/icu4c/source/test/cintltst/currtest.c @@ -83,6 +83,12 @@ static void TestEnumList(void) { expectInList("XEU", UCURR_UNCOMMON|UCURR_DEPRECATED, TRUE); expectInList("XEU", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE); + // ICU-21622 + expectInList("UYW", UCURR_ALL, TRUE); + expectInList("UYW", UCURR_COMMON, FALSE); + expectInList("UYW", UCURR_UNCOMMON, TRUE); + expectInList("UYW", UCURR_DEPRECATED, FALSE); + expectInList("UYW", UCURR_NON_DEPRECATED, TRUE); } static void TestEnumListReset(void) { diff --git a/icu4c/source/test/testdata/structLocale.txt b/icu4c/source/test/testdata/structLocale.txt index 5c81e17ec3b..2cbd39998f7 100644 --- a/icu4c/source/test/testdata/structLocale.txt +++ b/icu4c/source/test/testdata/structLocale.txt @@ -1363,6 +1363,10 @@ structLocale:table(nofallback){ "", "", } + UYW{ + "", + "", + } UZS{ "", "", @@ -1630,6 +1634,7 @@ structLocale:table(nofallback){ UAH{""} USD{""} UYU{""} + UYW{""} VEF{""} VND{""} XCD{""} @@ -3683,6 +3688,14 @@ structLocale:table(nofallback){ many{""} other{""} } + UYW{ + zero{""} + one{""} + two{""} + few{""} + many{""} + other{""} + } UZS{ zero{""} one{""} diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/CurrencyTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/CurrencyTest.java index 103b006bbf1..c8bc708565a 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/CurrencyTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/CurrencyTest.java @@ -570,6 +570,17 @@ public class CurrencyTest extends TestFmwk { metainfo.currencies(filter.withTender())); } + @Test + public void TestFullCurrencyList() { + CurrencyMetaInfo metainfo = CurrencyMetaInfo.getInstance(); + if (metainfo == null) { + errln("Unable to get CurrencyMetaInfo instance."); + return; + } + List currencies = metainfo.currencies(null); + assertTrue("Full currencies list should include UYW", currencies.contains("UYW")); // ICU-21622 + } + // Coverage-only test of the CurrencyMetaInfo class @Test public void TestCurrencyMetaInfo() {