From 3acb4cc8f31355c2a03a9ef1000c623ddc8a766b Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 20 Sep 2002 18:03:18 +0000 Subject: [PATCH] ICU-2248 check only for algorithmic converters when UCONFIG_NO_LEGACY_CONVERSION X-SVN-Rev: 9904 --- icu4c/source/test/cintltst/cintltst.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c index d4a9f482015..3730ad377e6 100644 --- a/icu4c/source/test/cintltst/cintltst.c +++ b/icu4c/source/test/cintltst/cintltst.c @@ -63,6 +63,14 @@ void addSetup(TestNode** root) addTest(root, &TestMutex, "setup/TestMutex"); } +#if UCONFIG_NO_LEGACY_CONVERSION +# define TRY_CNV_1 "iso-8859-1" +# define TRY_CNV_2 "ibm-1208" +#else +# define TRY_CNV_1 "iso-8859-7" +# define TRY_CNV_2 "sjis" +#endif + int main(int argc, const char* const argv[]) { int nerrors = 0; @@ -82,13 +90,13 @@ int main(int argc, const char* const argv[]) ctst_init(); #endif /* try opening the data from dll instead of the dat file */ - cnv = ucnv_open("iso-8859-7", &errorCode); + cnv = ucnv_open(TRY_CNV_1, &errorCode); if(cnv != 0) { /* ok */ ucnv_close(cnv); } else { fprintf(stderr, - "#### WARNING! The converter for iso-8859-7 cannot be loaded from data dll/so." + "#### WARNING! The converter for " TRY_CNV_1 " cannot be loaded from data dll/so." "Proceeding to load data from dat file.\n"); errorCode = U_ZERO_ERROR; @@ -115,13 +123,13 @@ int main(int argc, const char* const argv[]) } /* try more data */ - cnv = ucnv_open("iso-8859-7", &errorCode); + cnv = ucnv_open(TRY_CNV_2, &errorCode); if(cnv != 0) { /* ok */ ucnv_close(cnv); } else { fprintf(stderr, - "*** Failure! The converter for iso-8859-7 cannot be opened.\n" + "*** Failure! The converter for " TRY_CNV_2 " cannot be opened.\n" "*** Check the ICU_DATA environment variable and \n" "*** check that the data files are present.\n"); return 1;