From 6244d57559790eedf1ca88082c5baa1be6e638d9 Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Thu, 22 Jul 2021 23:24:51 -0700 Subject: [PATCH] ICU-21685 In list of currencies from ucurr_openISOCurrencies(): add VES, remove EQE --- icu4c/source/common/ucurr.cpp | 2 +- icu4c/source/test/cintltst/currtest.c | 9 +++++++ icu4c/source/test/testdata/structLocale.txt | 25 ++++++++++--------- .../ibm/icu/dev/test/util/CurrencyTest.java | 2 ++ 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/icu4c/source/common/ucurr.cpp b/icu4c/source/common/ucurr.cpp index 309b86e0ae4..67aab4e8ffe 100644 --- a/icu4c/source/common/ucurr.cpp +++ b/icu4c/source/common/ucurr.cpp @@ -1791,7 +1791,6 @@ static const struct CurrencyList { {"ECV", UCURR_UNCOMMON|UCURR_DEPRECATED}, {"EEK", UCURR_COMMON|UCURR_DEPRECATED}, {"EGP", UCURR_COMMON|UCURR_NON_DEPRECATED}, - {"EQE", UCURR_COMMON|UCURR_DEPRECATED}, // questionable, remove? {"ERN", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"ESA", UCURR_UNCOMMON|UCURR_DEPRECATED}, {"ESB", UCURR_UNCOMMON|UCURR_DEPRECATED}, @@ -1967,6 +1966,7 @@ static const struct CurrencyList { {"UZS", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"VEB", UCURR_COMMON|UCURR_DEPRECATED}, {"VEF", UCURR_COMMON|UCURR_NON_DEPRECATED}, + {"VES", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"VND", UCURR_COMMON|UCURR_NON_DEPRECATED}, {"VNN", UCURR_COMMON|UCURR_DEPRECATED}, {"VUV", UCURR_COMMON|UCURR_NON_DEPRECATED}, diff --git a/icu4c/source/test/cintltst/currtest.c b/icu4c/source/test/cintltst/currtest.c index e35333d320c..9f3254fe855 100644 --- a/icu4c/source/test/cintltst/currtest.c +++ b/icu4c/source/test/cintltst/currtest.c @@ -89,6 +89,15 @@ static void TestEnumList(void) { expectInList("UYW", UCURR_UNCOMMON, TRUE); expectInList("UYW", UCURR_DEPRECATED, FALSE); expectInList("UYW", UCURR_NON_DEPRECATED, TRUE); + + // ICU-21685 + expectInList("VES", UCURR_ALL, TRUE); + expectInList("VES", UCURR_COMMON, TRUE); + expectInList("VES", UCURR_UNCOMMON, FALSE); + expectInList("VES", UCURR_DEPRECATED, FALSE); + expectInList("VES", UCURR_NON_DEPRECATED, TRUE); + + expectInList("EQE", UCURR_ALL, FALSE); } static void TestEnumListReset(void) { diff --git a/icu4c/source/test/testdata/structLocale.txt b/icu4c/source/test/testdata/structLocale.txt index d9f72c8e571..74ff98ce044 100644 --- a/icu4c/source/test/testdata/structLocale.txt +++ b/icu4c/source/test/testdata/structLocale.txt @@ -675,10 +675,6 @@ structLocale:table(nofallback){ "", "", } - EQE{ - "", - "", - } ERN{ "", "", @@ -1379,6 +1375,10 @@ structLocale:table(nofallback){ "", "", } + VES{ + "", + "", + } VND{ "", "", @@ -1636,6 +1636,7 @@ structLocale:table(nofallback){ UYU{""} UYW{""} VEF{""} + VES{""} VND{""} XCD{""} ZAR{""} @@ -2336,14 +2337,6 @@ structLocale:table(nofallback){ many{""} other{""} } - EQE{ - zero{""} - one{""} - two{""} - few{""} - many{""} - other{""} - } ERN{ zero{""} one{""} @@ -3720,6 +3713,14 @@ structLocale:table(nofallback){ many{""} other{""} } + VES{ + zero{""} + one{""} + two{""} + few{""} + many{""} + other{""} + } VND{ 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 c8bc708565a..50e8e1438dc 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 @@ -579,6 +579,8 @@ public class CurrencyTest extends TestFmwk { } List currencies = metainfo.currencies(null); assertTrue("Full currencies list should include UYW", currencies.contains("UYW")); // ICU-21622 + assertTrue("Full currencies list should include VES", currencies.contains("VES")); // ICU-21685 + assertFalse("Full currencies list should not include EQE", currencies.contains("EQE")); // ICU-21685 } // Coverage-only test of the CurrencyMetaInfo class -- 2.40.0