diff --git a/icu4c/source/test/intltest/restest.cpp b/icu4c/source/test/intltest/restest.cpp index cac7ba7d624..50a5067af25 100644 --- a/icu4c/source/test/intltest/restest.cpp +++ b/icu4c/source/test/intltest/restest.cpp @@ -19,6 +19,7 @@ #include "cstring.h" #include "unicode/unistr.h" +#include "unicode/uniset.h" #include "unicode/resbund.h" #include "restest.h" #include @@ -192,7 +193,7 @@ void ResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* switch (index) { case 0: name = "TestResourceBundles"; if (exec) TestResourceBundles(); break; case 1: name = "TestConstruction"; if (exec) TestConstruction(); break; - + case 2: name = "TestExemplar"; if (exec) TestExemplar(); break; default: name = ""; break; //needed to end loop } } @@ -529,5 +530,32 @@ ResourceBundleTest::record_fail(UnicodeString errMessage) err(errMessage); ++fail; } + +void +ResourceBundleTest::TestExemplar(){ + + int32_t locCount = uloc_countAvailable(); + int32_t locIndex=0; + int num=0; + UErrorCode status = U_ZERO_ERROR; + for(;locIndex