From a15b66a53daf870fd7a650f021aac0de521483a9 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Wed, 23 Aug 2000 19:11:16 +0000 Subject: [PATCH] ICU-535 fixed some compiler warnings X-SVN-Rev: 2339 --- icu4c/source/test/intltest/allcoll.cpp | 18 +- icu4c/source/test/intltest/allcoll.h | 10 +- icu4c/source/test/intltest/apicoll.cpp | 34 +- icu4c/source/test/intltest/apicoll.h | 18 +- icu4c/source/test/intltest/citrtest.cpp | 2 +- icu4c/source/test/intltest/cpdtrtst.cpp | 2 +- icu4c/source/test/intltest/cppcnvt.cpp | 565 ++++++++++++----------- icu4c/source/test/intltest/currcoll.cpp | 6 +- icu4c/source/test/intltest/currcoll.h | 2 +- icu4c/source/test/intltest/dacoll.cpp | 10 +- icu4c/source/test/intltest/dacoll.h | 4 +- icu4c/source/test/intltest/dcfmapts.cpp | 10 +- icu4c/source/test/intltest/dcfmapts.h | 4 +- icu4c/source/test/intltest/decoll.cpp | 10 +- icu4c/source/test/intltest/decoll.h | 6 +- icu4c/source/test/intltest/dtfmapts.cpp | 6 +- icu4c/source/test/intltest/dtfmapts.h | 2 +- icu4c/source/test/intltest/dtfmrgts.cpp | 2 +- icu4c/source/test/intltest/dtfmtrtts.cpp | 2 +- icu4c/source/test/intltest/dtfmttst.cpp | 2 +- icu4c/source/test/intltest/encoll.cpp | 14 +- icu4c/source/test/intltest/encoll.h | 6 +- icu4c/source/test/intltest/escoll.cpp | 10 +- icu4c/source/test/intltest/escoll.h | 4 +- icu4c/source/test/intltest/ficoll.cpp | 10 +- icu4c/source/test/intltest/ficoll.h | 4 +- icu4c/source/test/intltest/frcoll.cpp | 14 +- icu4c/source/test/intltest/frcoll.h | 6 +- icu4c/source/test/intltest/g7coll.cpp | 22 +- icu4c/source/test/intltest/g7coll.h | 10 +- icu4c/source/test/intltest/hajatrts.cpp | 2 +- icu4c/source/test/intltest/hxuntrts.cpp | 2 +- icu4c/source/test/intltest/isocoll.cpp | 6 +- icu4c/source/test/intltest/isocoll.h | 2 +- icu4c/source/test/intltest/itercoll.cpp | 22 +- icu4c/source/test/intltest/itercoll.h | 10 +- icu4c/source/test/intltest/ittxtbd.cpp | 2 +- icu4c/source/test/intltest/jacoll.cpp | 6 +- icu4c/source/test/intltest/jacoll.h | 2 +- icu4c/source/test/intltest/jahatrts.cpp | 2 +- icu4c/source/test/intltest/loctest.cpp | 2 +- icu4c/source/test/intltest/miscdtfm.cpp | 6 +- icu4c/source/test/intltest/mnkytst.cpp | 14 +- icu4c/source/test/intltest/mnkytst.h | 6 +- icu4c/source/test/intltest/msfmrgts.cpp | 2 +- icu4c/source/test/intltest/nmfmapts.cpp | 6 +- icu4c/source/test/intltest/nmfmapts.h | 2 +- icu4c/source/test/intltest/nmfmtrt.cpp | 2 +- icu4c/source/test/intltest/normconf.cpp | 2 +- icu4c/source/test/intltest/numfmtst.cpp | 6 +- icu4c/source/test/intltest/numrgts.cpp | 2 +- icu4c/source/test/intltest/pptest.cpp | 2 +- icu4c/source/test/intltest/rbbiapts.cpp | 2 +- icu4c/source/test/intltest/rbbitst.cpp | 2 +- icu4c/source/test/intltest/regcoll.cpp | 126 ++--- icu4c/source/test/intltest/regcoll.h | 62 +-- icu4c/source/test/intltest/restest.cpp | 2 +- icu4c/source/test/intltest/restest.h | 2 +- icu4c/source/test/intltest/restsnew.cpp | 2 +- icu4c/source/test/intltest/restsnew.h | 2 +- icu4c/source/test/intltest/sdtfmtts.cpp | 6 +- icu4c/source/test/intltest/sdtfmtts.h | 2 +- icu4c/source/test/intltest/strtest.cpp | 2 +- icu4c/source/test/intltest/tchcfmt.cpp | 6 +- icu4c/source/test/intltest/tfsmalls.cpp | 6 +- icu4c/source/test/intltest/thcoll.cpp | 2 +- icu4c/source/test/intltest/tmsgfmt.cpp | 14 +- icu4c/source/test/intltest/tmsgfmt.h | 6 +- icu4c/source/test/intltest/transapi.cpp | 2 +- icu4c/source/test/intltest/transrt.cpp | 2 +- icu4c/source/test/intltest/transtst.cpp | 2 +- icu4c/source/test/intltest/trcoll.cpp | 10 +- icu4c/source/test/intltest/trcoll.h | 4 +- icu4c/source/test/intltest/tsdate.cpp | 26 +- icu4c/source/test/intltest/tsdate.h | 8 +- icu4c/source/test/intltest/tsdcfmsy.cpp | 6 +- icu4c/source/test/intltest/tsdcfmsy.h | 2 +- icu4c/source/test/intltest/tsdtfmsy.cpp | 6 +- icu4c/source/test/intltest/tsdtfmsy.h | 2 +- icu4c/source/test/intltest/tsmthred.cpp | 8 +- icu4c/source/test/intltest/tsmutex.cpp | 2 +- icu4c/source/test/intltest/tsnmfmt.cpp | 29 +- icu4c/source/test/intltest/tsnmfmt.h | 8 +- icu4c/source/test/intltest/tsputil.cpp | 12 +- icu4c/source/test/intltest/tstnorm.cpp | 2 +- icu4c/source/test/intltest/tzbdtest.cpp | 2 +- icu4c/source/test/intltest/tzregts.cpp | 2 +- icu4c/source/test/intltest/tztest.cpp | 2 +- icu4c/source/test/intltest/ucdtest.cpp | 2 +- icu4c/source/test/intltest/ufltlgts.cpp | 2 +- icu4c/source/test/intltest/unhxtrts.cpp | 2 +- icu4c/source/test/intltest/usettest.cpp | 2 +- icu4c/source/test/intltest/ustrtest.cpp | 2 +- 93 files changed, 670 insertions(+), 644 deletions(-) diff --git a/icu4c/source/test/intltest/allcoll.cpp b/icu4c/source/test/intltest/allcoll.cpp index e5ca1a133d0..52d1d36199d 100644 --- a/icu4c/source/test/intltest/allcoll.cpp +++ b/icu4c/source/test/intltest/allcoll.cpp @@ -109,7 +109,7 @@ void CollationDummyTest::doTest( UnicodeString source, UnicodeString target, Col reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationDummyTest::TestTertiary( char* par ) +void CollationDummyTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -118,7 +118,7 @@ void CollationDummyTest::TestTertiary( char* par ) doTest(testSourceCases[i], testTargetCases[i], results[i]); } } -void CollationDummyTest::TestPrimary( char* par ) +void CollationDummyTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -128,7 +128,7 @@ void CollationDummyTest::TestPrimary( char* par ) } } -void CollationDummyTest::TestSecondary( char* par ) +void CollationDummyTest::TestSecondary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::SECONDARY); @@ -138,7 +138,7 @@ void CollationDummyTest::TestSecondary( char* par ) } } -void CollationDummyTest::TestExtra( char* par ) +void CollationDummyTest::TestExtra(/* char* par */) { int32_t i, j; myCollation->setStrength(Collator::TERTIARY); @@ -151,14 +151,14 @@ void CollationDummyTest::TestExtra( char* par ) } } -void CollationDummyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationDummyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationDummyTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestSecondary"; if (exec) TestSecondary( par ); break; - case 2: name = "TestTertiary"; if (exec) TestTertiary( par ); break; - case 3: name = "TestExtra"; if (exec) TestExtra( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break; + case 2: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; + case 3: name = "TestExtra"; if (exec) TestExtra(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/allcoll.h b/icu4c/source/test/intltest/allcoll.h index 0772256e677..2529084706d 100644 --- a/icu4c/source/test/intltest/allcoll.h +++ b/icu4c/source/test/intltest/allcoll.h @@ -36,23 +36,23 @@ public: CollationDummyTest(); virtual ~CollationDummyTest(); - void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); + void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */); // main test method called with different strengths, // tests comparison of custum collation with different strengths void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform test with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform test with strength SECONDARY - void TestSecondary( char* par ); + void TestSecondary(/* char* par */); // perform test with strength tertiary - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); // perform extra tests - void TestExtra( char* par ); + void TestExtra(/* char* par */); private: static const Collator::EComparisonResult results[]; diff --git a/icu4c/source/test/intltest/apicoll.cpp b/icu4c/source/test/intltest/apicoll.cpp index a5b175ba779..fd2f64b8830 100644 --- a/icu4c/source/test/intltest/apicoll.cpp +++ b/icu4c/source/test/intltest/apicoll.cpp @@ -62,7 +62,7 @@ CollationAPITest::doAssert(UBool condition, const char *message) // ctor, dtor, createInstance, compare, getStrength/setStrength // getDecomposition/setDecomposition, getDisplayName void -CollationAPITest::TestProperty( char* par ) +CollationAPITest::TestProperty(/* char* par */) { UErrorCode success = U_ZERO_ERROR; Collator *col = 0; @@ -206,7 +206,7 @@ CollationAPITest::TestProperty( char* par ) } void -CollationAPITest::TestHashCode( char* par ) +CollationAPITest::TestHashCode(/* char* par */) { logln("hashCode tests begin."); UErrorCode success = U_ZERO_ERROR; @@ -251,7 +251,7 @@ CollationAPITest::TestHashCode( char* par ) // CollationKey -- Tests the CollationKey methods // void -CollationAPITest::TestCollationKey( char* par ) +CollationAPITest::TestCollationKey(/* char* par */) { logln("testing CollationKey begins..."); Collator *col = 0; @@ -335,7 +335,7 @@ CollationAPITest::TestCollationKey( char* par ) // ctor, RuleBasedCollator::createCollationElementIterator(), operator==, operator!= // void -CollationAPITest::TestElemIter( char* par ) +CollationAPITest::TestElemIter(/* char* par */) { logln("testing sortkey begins..."); Collator *col = 0; @@ -525,7 +525,7 @@ CollationAPITest::TestElemIter( char* par ) // Test RuleBasedCollator ctor, dtor, operator==, operator!=, clone, copy, and getRules void -CollationAPITest::TestOperators( char* par ) +CollationAPITest::TestOperators(/* char* par */) { UErrorCode success = U_ZERO_ERROR; UnicodeString ruleset1("< a, A < b, B < c, C; ch, cH, Ch, CH < d, D, e, E"); @@ -607,7 +607,7 @@ CollationAPITest::TestOperators( char* par ) // test clone and copy void -CollationAPITest::TestDuplicate( char* par ) +CollationAPITest::TestDuplicate(/* char* par */) { UErrorCode status = U_ZERO_ERROR; Collator *col1 = Collator::createInstance(status); @@ -628,7 +628,7 @@ CollationAPITest::TestDuplicate( char* par ) } void -CollationAPITest::TestCompare( char* par ) +CollationAPITest::TestCompare(/* char* par */) { logln("The compare tests begin : "); Collator *col = 0; @@ -663,7 +663,7 @@ CollationAPITest::TestCompare( char* par ) } void -CollationAPITest::TestGetAll( char* par ) +CollationAPITest::TestGetAll(/* char* par */) { int32_t count; const Locale* list = Collator::getAvailableLocales(count); @@ -677,18 +677,18 @@ CollationAPITest::TestGetAll( char* par ) } -void CollationAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */) { if (exec) logln("TestSuite CollationAPITest: "); switch (index) { - case 0: name = "TestProperty"; if (exec) TestProperty( par ); break; - case 1: name = "TestOperators"; if (exec) TestOperators( par ); break; - case 2: name = "TestDuplicate"; if (exec) TestDuplicate( par ); break; - case 3: name = "TestCompare"; if (exec) TestCompare( par ); break; - case 4: name = "TestHashCode"; if (exec) TestHashCode( par ); break; - case 5: name = "TestCollationKey"; if (exec) TestCollationKey( par ); break; - case 6: name = "TestElemIter"; if (exec) TestElemIter( par ); break; - case 7: name = "TestGetAll"; if (exec) TestGetAll( par ); break; + case 0: name = "TestProperty"; if (exec) TestProperty(/* par */); break; + case 1: name = "TestOperators"; if (exec) TestOperators(/* par */); break; + case 2: name = "TestDuplicate"; if (exec) TestDuplicate(/* par */); break; + case 3: name = "TestCompare"; if (exec) TestCompare(/* par */); break; + case 4: name = "TestHashCode"; if (exec) TestHashCode(/* par */); break; + case 5: name = "TestCollationKey"; if (exec) TestCollationKey(/* par */); break; + case 6: name = "TestElemIter"; if (exec) TestElemIter(/* par */); break; + case 7: name = "TestGetAll"; if (exec) TestGetAll(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/apicoll.h b/icu4c/source/test/intltest/apicoll.h index 94f02b68c57..f4b40f73bcc 100644 --- a/icu4c/source/test/intltest/apicoll.h +++ b/icu4c/source/test/intltest/apicoll.h @@ -30,7 +30,7 @@ class CollationAPITest: public IntlTest { public: - void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); + void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */); void doAssert(UBool condition, const char *message); /** @@ -41,7 +41,7 @@ public: * - get/set decomposition mode and comparison level * - displayable name in the desired locale */ - void TestProperty( char* par ); + void TestProperty(/* char* par */); /** * This tests the properties of a rule based collator object. @@ -50,12 +50,12 @@ public: * - clone and copy * - collation rules access */ - void TestOperators( char* par ); + void TestOperators(/* char* par */); /** * This tests the duplication of a collator object. */ - void TestDuplicate( char* par ); + void TestDuplicate(/* char* par */); /** * This tests the comparison convenience methods of a collator object. @@ -63,12 +63,12 @@ public: * - greater than or equal to * - equal to */ - void TestCompare( char* par ); + void TestCompare(/* char* par */); /** * This tests the hashCode method of a collator object. */ - void TestHashCode( char* par ); + void TestHashCode(/* char* par */); /** * This tests the collation key related APIs. @@ -78,7 +78,7 @@ public: * - comparison between collation keys * - creating collation key with a byte array and vice versa */ - void TestCollationKey( char* par ); + void TestCollationKey(/* char* par */); /** * This tests the CollationElementIterator related APIs. @@ -88,12 +88,12 @@ public: * - reseting the iterator index * - requesting the order properties(primary, secondary or tertiary) */ - void TestElemIter( char* par ); + void TestElemIter(/* char* par */); /** * This tests the list the all available locales. */ - void TestGetAll( char* par ); + void TestGetAll(/* char* par */); private: // static constants diff --git a/icu4c/source/test/intltest/citrtest.cpp b/icu4c/source/test/intltest/citrtest.cpp index 4e769b2dfdd..0a6b28375eb 100644 --- a/icu4c/source/test/intltest/citrtest.cpp +++ b/icu4c/source/test/intltest/citrtest.cpp @@ -21,7 +21,7 @@ CharIterTest::~CharIterTest() { } -void CharIterTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CharIterTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite LocaleTest: "); switch (index) { diff --git a/icu4c/source/test/intltest/cpdtrtst.cpp b/icu4c/source/test/intltest/cpdtrtst.cpp index 7b2411c09c3..5f6567e6b9c 100644 --- a/icu4c/source/test/intltest/cpdtrtst.cpp +++ b/icu4c/source/test/intltest/cpdtrtst.cpp @@ -27,7 +27,7 @@ // runIndexedTest //--------------------------------------------- -void CompoundTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CompoundTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite CompoundTransliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/cppcnvt.cpp b/icu4c/source/test/intltest/cppcnvt.cpp index cb0664cd2ee..44220792d2a 100644 --- a/icu4c/source/test/intltest/cppcnvt.cpp +++ b/icu4c/source/test/intltest/cppcnvt.cpp @@ -29,7 +29,7 @@ UConverterToUCallback otherCharAction(UConverterToUCallback MIA); /*Asciifies the UErrorCodes*/ #define myErrorName(errorCode) u_errorName(errorCode) -void ConvertTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void ConvertTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite ConvertTest: "); switch (index) { @@ -44,30 +44,29 @@ void ConvertTest::TestConvert() char myptr[4]; char save[4]; int32_t testLong1; - int16_t rest = 0; - int32_t x = 0; - FILE* ucs_file_in = NULL; - UChar BOM = 0x0000; - UChar myUChar = 0x0000; + int16_t rest = 0; + int32_t x = 0; + FILE* ucs_file_in = NULL; + UChar BOM = 0x0000; + UChar myUChar = 0x0000; char mytarget[MAX_FILE_LEN]; char* mytarget_1 = mytarget; char* mytarget_use = mytarget; - char* consumed = NULL; - char output_cp_buffer [MAX_FILE_LEN]; - UChar ucs_file_buffer [MAX_FILE_LEN]; - UChar* ucs_file_buffer_use = ucs_file_buffer; - UChar my_ucs_file_buffer [MAX_FILE_LEN]; - UChar* my_ucs_file_buffer_1 = my_ucs_file_buffer; - int32_t i = 0; - int8_t ii = 0; - int32_t j = 0; - uint16_t codepage_index = 0; - int32_t cp = 0; - UErrorCode err = U_ZERO_ERROR; - const char* const* available_conv = NULL; + char* consumed = NULL; + char output_cp_buffer[MAX_FILE_LEN]; + UChar ucs_file_buffer[MAX_FILE_LEN]; + UChar* ucs_file_buffer_use = ucs_file_buffer; + UChar my_ucs_file_buffer[MAX_FILE_LEN]; + UChar* my_ucs_file_buffer_1 = my_ucs_file_buffer; + int32_t i = 0; + int8_t ii = 0; + uint16_t codepage_index = 0; + int32_t cp = 0; + UErrorCode err = U_ZERO_ERROR; + const char* const* available_conv = NULL; char ucs_file_name[UCS_FILE_NAME_SIZE]; - UConverterFromUCallback MIA1, MIA1_2; - UConverterToUCallback MIA2, MIA2_2; + UConverterFromUCallback MIA1, MIA1_2; + UConverterToUCallback MIA2, MIA2_2; void *MIA1Context, *MIA1Context2, *MIA2Context, *MIA2Context2; UnicodeConverter* someConverters[5]; /****************************************************************** @@ -78,19 +77,18 @@ void ConvertTest::TestConvert() { "IBM-949" - - }; + }; + const uint16_t CodePageNumberToTest[NUM_CODEPAGE] = { 949 }; - + /* const int32_t CodePagesAsciiControls[NUM_CODEPAGE] = { 0xFFFFFFFF - - + }; const int32_t CodePagesOtherControls[NUM_CODEPAGE] = @@ -100,31 +98,31 @@ void ConvertTest::TestConvert() const int8_t CodePagesMinChars[NUM_CODEPAGE] = - { + { 1 - + }; const int8_t CodePagesMaxChars[NUM_CODEPAGE] = - { + { 2 - + }; const int16_t CodePagesSubstitutionChars[NUM_CODEPAGE] = - { + { (int16_t)0xAFFE - + }; const char* CodePagesTestFiles[NUM_CODEPAGE] = - { + { "uni-text.txt" }; - + const UConverterPlatform CodePagesPlatform[NUM_CODEPAGE] = - { + { UCNV_IBM }; @@ -150,7 +148,7 @@ void ConvertTest::TestConvert() void* toUContext = NULL; /*Calling all the UnicodeConverter API and checking functionality*/ - + /*Tests UnicodeConverter::getAvailableNames*/ logln("\n---Testing UnicodeConverter::getAvailableNames..."); available_conv = UnicodeConverter::getAvailableNames(testLong1, err); @@ -187,7 +185,7 @@ void ConvertTest::TestConvert() delete someConverters[1]; delete someConverters[2]; delete someConverters[3]; - if (j=UnicodeConverter::flushCache()==2) logln("Flush cache ok"); + if (UnicodeConverter::flushCache()==2) logln("Flush cache ok"); else errln("Flush Cache failed"); delete someConverters[4]; @@ -198,7 +196,8 @@ void ConvertTest::TestConvert() someConverters[0] = new UnicodeConverter; someConverters[1] = new UnicodeConverter; someConverters[2] = new UnicodeConverter("utf8", err); - if (U_FAILURE(err)) errln ((UnicodeString)"FAILURE! " + myErrorName(err)); + if (U_FAILURE(err)) + errln ((UnicodeString)"FAILURE! " + myErrorName(err)); logln("\n---Testing getName..."); @@ -240,8 +239,9 @@ void ConvertTest::TestConvert() *someConverters[3] = *someConverters[2]; if ((*someConverters[2] == *someConverters[3])) logln("Equality test ok"); - else errln("Equality test failed line " + UnicodeString() + 262); - + else + errln("Equality test failed line " + UnicodeString() + 262); + delete someConverters[0]; delete someConverters[1]; delete someConverters[2]; @@ -249,11 +249,11 @@ void ConvertTest::TestConvert() for (codepage_index=0; codepage_index < NUM_CODEPAGE; codepage_index++) { - i = 0; - strcpy(ucs_file_name, IntlTest::getTestDirectory()); - strcat(ucs_file_name, CodePagesTestFiles[codepage_index]); + i = 0; + strcpy(ucs_file_name, IntlTest::getTestDirectory()); + strcat(ucs_file_name, CodePagesTestFiles[codepage_index]); - ucs_file_in = fopen(ucs_file_name, "rb"); + ucs_file_in = fopen(ucs_file_name, "rb"); if (!ucs_file_in) { errln("Couldn't open the Unicode file..."); @@ -262,189 +262,203 @@ void ConvertTest::TestConvert() /*Creates a converter*/ - UnicodeConverter* myConverter = new UnicodeConverter(CodePageNumberToTest[codepage_index],UCNV_IBM, err); - - if (!myConverter) + UnicodeConverter* myConverter = new UnicodeConverter(CodePageNumberToTest[codepage_index],UCNV_IBM, err); + + if (!myConverter) { errln("Error Creating the converter from " + (UnicodeString)CodePagesToTest[codepage_index] + " codepage.\nMake sure you have ran the uconvdef tool to create " + (UnicodeString)CodePagesToTest[codepage_index] + ".cnv in the locales directory"); return; } - + /*Tests getMaxBytesPerChar and getMinBytesPerChar*/ - logln("\n---Testing UnicodeConverter::getMaxBytesPerChar..."); - if (myConverter->getMaxBytesPerChar()==CodePagesMaxChars[codepage_index]) logln("Max byte per character OK"); - else errln("Max byte per character failed"); - - logln("\n---Testing UnicodeConverter::getMinBytesPerChar..."); - if (myConverter->getMinBytesPerChar()==CodePagesMinChars[codepage_index]) logln("Min byte per character OK"); - else errln("Min byte per character failed"); - + logln("\n---Testing UnicodeConverter::getMaxBytesPerChar..."); + if (myConverter->getMaxBytesPerChar()==CodePagesMaxChars[codepage_index]) + logln("Max byte per character OK"); + else + errln("Max byte per character failed"); + + logln("\n---Testing UnicodeConverter::getMinBytesPerChar..."); + if (myConverter->getMinBytesPerChar()==CodePagesMinChars[codepage_index]) + logln("Min byte per character OK"); + else + errln("Min byte per character failed"); + /*getSubstitutions char*/ - logln("\n---Testing UnicodeConverter::getSubstitutionChars..."); - ii=4; - myConverter->getSubstitutionChars(myptr,ii,err); - - for(x=0;xsetSubstitutionChars(myptr, ii, err); - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - myConverter->getSubstitutionChars(save, ii, err); - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - if (strncmp(save, myptr, ii)) errln("Saved substitution character failed"); - else logln("Saved substitution character ok"); - - /*resetState*/ - logln("\n---Testing UnicodeConverter::resetState..."); - myConverter->resetState(); - - - /*getName*/ - UnicodeString* testUnistr = new UnicodeString(); - logln("\n---Testing UnicodeConverter::getName..."); - if (strCaseIcmp(myConverter->getName(err), - CodePagesToTest[codepage_index])) errln("getName failed"); - else logln("getName ok"); - - /*getDisplayName*/ - testUnistr->remove(); - logln("\n---Testing UnicodeConverter::getDisplayName..."); - myConverter->getDisplayName(CodePagesLocale[codepage_index],*testUnistr); + logln("\n---Testing UnicodeConverter::getSubstitutionChars..."); + ii=4; + myConverter->getSubstitutionChars(myptr,ii,err); + + for(x=0;xsetSubstitutionChars(myptr, ii, err); + if (U_FAILURE(err)) + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + myConverter->getSubstitutionChars(save, ii, err); + if (U_FAILURE(err)) + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + if (strncmp(save, myptr, ii)) + errln("Saved substitution character failed"); + else + logln("Saved substitution character ok"); + + /*resetState*/ + logln("\n---Testing UnicodeConverter::resetState..."); + myConverter->resetState(); + + + /*getName*/ + UnicodeString* testUnistr = new UnicodeString(); + logln("\n---Testing UnicodeConverter::getName..."); + if (strCaseIcmp(myConverter->getName(err), CodePagesToTest[codepage_index])) + errln("getName failed"); + else + logln("getName ok"); + + /*getDisplayName*/ + testUnistr->remove(); + logln("\n---Testing UnicodeConverter::getDisplayName..."); + myConverter->getDisplayName(CodePagesLocale[codepage_index],*testUnistr); + + /*printUChar(T_UnicodeString_getUChars(testUnistr)); + logln("\nAbove is DisplayName!!");*/ - /*printUChar(T_UnicodeString_getUChars(testUnistr)); - logln("\nAbove is DisplayName!!");*/ - /*getMissingUnicodeAction*/ - /* logln("\n---Testing UnicodeConverter::getMissingUnicodeAction..."); - if ((MIA1 = myConverter->getMissingUnicodeAction()) != CodePagesMissingUnicodeAction[codepage_index]) errln("Missing action failed"); - else logln("Missing action ok");*/ + /* logln("\n---Testing UnicodeConverter::getMissingUnicodeAction..."); + if ((MIA1 = myConverter->getMissingUnicodeAction()) != CodePagesMissingUnicodeAction[codepage_index]) errln("Missing action failed"); + else logln("Missing action ok");*/ /*getMissingCharAction*/ - /* logln("\n---Testing UnicodeConverter::getMissingCharAction..."); - if ((MIA2 = myConverter->getMissingCharAction()) != CodePagesMissingCharAction[codepage_index]) errln("Missing action failed"); - else logln("Missing action ok");*/ + /* logln("\n---Testing UnicodeConverter::getMissingCharAction..."); + if ((MIA2 = myConverter->getMissingCharAction()) != CodePagesMissingCharAction[codepage_index]) errln("Missing action failed"); + else logln("Missing action ok");*/ - myConverter->getMissingUnicodeAction(&MIA1, &MIA1Context); - myConverter->getMissingCharAction(&MIA2, &MIA2Context); + myConverter->getMissingUnicodeAction(&MIA1, &MIA1Context); + myConverter->getMissingCharAction(&MIA2, &MIA2Context); /*setMissingUnicodeAction*/ - logln("\n---Testing UnicodeConverter::setMissingUnicodeAction..."); - myConverter->setMissingUnicodeAction(otherUnicodeAction(MIA1), &BOM, &fromUAction, &fromUContext, err); - if (U_FAILURE(err) || fromUAction != MIA1 || fromUContext != MIA1Context) - { - errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - } - myConverter->getMissingUnicodeAction(&MIA1_2, &MIA1Context2); - if (MIA1_2 != otherUnicodeAction(MIA1) || MIA1Context2 != &BOM) - { - errln("Missing action failed"); - } - else - { - logln("Missing action ok"); - } + logln("\n---Testing UnicodeConverter::setMissingUnicodeAction..."); + myConverter->setMissingUnicodeAction(otherUnicodeAction(MIA1), &BOM, &fromUAction, &fromUContext, err); + if (U_FAILURE(err) || fromUAction != MIA1 || fromUContext != MIA1Context) + { + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + } + myConverter->getMissingUnicodeAction(&MIA1_2, &MIA1Context2); + if (MIA1_2 != otherUnicodeAction(MIA1) || MIA1Context2 != &BOM) + { + errln("Missing action failed"); + } + else + { + logln("Missing action ok"); + } - logln("\n---Testing UnicodeConverter::setMissingUnicodeAction Roundtrip..."); - myConverter->setMissingUnicodeAction(MIA1, MIA1Context, &fromUAction, &fromUContext, err); - if (U_FAILURE(err) || fromUAction != otherUnicodeAction(MIA1) || fromUContext != &BOM) - { - errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - } - myConverter->getMissingUnicodeAction(&MIA1_2, &MIA1Context2); - if (MIA1_2 != MIA1 || MIA1Context2 != MIA1Context) - { - errln("Missing action failed"); - } - else - { - logln("Missing action ok"); - } + logln("\n---Testing UnicodeConverter::setMissingUnicodeAction Roundtrip..."); + myConverter->setMissingUnicodeAction(MIA1, MIA1Context, &fromUAction, &fromUContext, err); + if (U_FAILURE(err) || fromUAction != otherUnicodeAction(MIA1) || fromUContext != &BOM) + { + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + } + myConverter->getMissingUnicodeAction(&MIA1_2, &MIA1Context2); + if (MIA1_2 != MIA1 || MIA1Context2 != MIA1Context) + { + errln("Missing action failed"); + } + else + { + logln("Missing action ok"); + } /*setMissingCharAction*/ - logln("\n---Testing UnicodeConverter::setMissingCharAction..."); - myConverter->setMissingCharAction(otherCharAction(MIA2), &BOM, &toUAction, &toUContext, err); - if (U_FAILURE(err) || toUAction != MIA2 || toUContext != MIA2Context) - { - errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - } - myConverter->getMissingCharAction(&MIA2_2, &MIA2Context2); - if (MIA2_2 != otherCharAction(MIA2) || MIA2Context2 != &BOM) - { - errln("Missing action failed"); - } - else - { - logln("Missing action ok"); - } - - logln("\n---Testing UnicodeConverter::setMissingCharAction Roundtrip..."); - myConverter->setMissingCharAction(MIA2, MIA2Context, &toUAction, &toUContext, err); - if (U_FAILURE(err) || toUAction != otherCharAction(MIA2) || toUContext != &BOM) - { - errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - } - myConverter->getMissingCharAction(&MIA2_2, &MIA2Context2); - if (MIA2_2 != MIA2 || MIA2Context2 != MIA2Context) - { - errln("Missing action failed"); - } - else - { - logln("Missing action ok"); - } + logln("\n---Testing UnicodeConverter::setMissingCharAction..."); + myConverter->setMissingCharAction(otherCharAction(MIA2), &BOM, &toUAction, &toUContext, err); + if (U_FAILURE(err) || toUAction != MIA2 || toUContext != MIA2Context) + { + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + } + myConverter->getMissingCharAction(&MIA2_2, &MIA2Context2); + if (MIA2_2 != otherCharAction(MIA2) || MIA2Context2 != &BOM) + { + errln("Missing action failed"); + } + else + { + logln("Missing action ok"); + } + + logln("\n---Testing UnicodeConverter::setMissingCharAction Roundtrip..."); + myConverter->setMissingCharAction(MIA2, MIA2Context, &toUAction, &toUContext, err); + if (U_FAILURE(err) || toUAction != otherCharAction(MIA2) || toUContext != &BOM) + { + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + } + myConverter->getMissingCharAction(&MIA2_2, &MIA2Context2); + if (MIA2_2 != MIA2 || MIA2Context2 != MIA2Context) + { + errln("Missing action failed"); + } + else + { + logln("Missing action ok"); + } /*getCodepage*/ - logln("\n---Testing UnicodeConverter::getCodepage..."); - cp = myConverter->getCodepage(err); - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - if (cp != CodePageNumberToTest[codepage_index]) errln("Codepage number test failed"); - else logln("Codepage number test OK"); - + logln("\n---Testing UnicodeConverter::getCodepage..."); + cp = myConverter->getCodepage(err); + if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + if (cp != CodePageNumberToTest[codepage_index]) errln("Codepage number test failed"); + else logln("Codepage number test OK"); + + - /*getCodepagePlatform*/ - logln("\n---Testing UnicodeConverter::getCodepagePlatform ..."); - if (CodePagesPlatform[codepage_index]!=myConverter->getCodepagePlatform(err)) errln("Platform codepage test failed"); - else logln("Platform codepage test ok"); - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + logln("\n---Testing UnicodeConverter::getCodepagePlatform ..."); + if (CodePagesPlatform[codepage_index]!=myConverter->getCodepagePlatform(err)) + errln("Platform codepage test failed"); + else + logln("Platform codepage test ok"); + if (U_FAILURE(err)) + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); /*Reads the BOM*/ fread(&BOM, sizeof(UChar), 1, ucs_file_in); if (BOM!=0xFEFF && BOM!=0xFFFE) - { + { errln("File Missing BOM...Bailing!"); return; - } + } + - /*Reads in the file*/ - while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in))) + while(!feof(ucs_file_in)&&(i+=fread(ucs_file_buffer+i, sizeof(UChar), 1, ucs_file_in))) { myUChar = ucs_file_buffer[i-1]; ucs_file_buffer[i-1] = (UChar)((BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8))); /*adjust if BIG_ENDIAN*/ } - myUChar = ucs_file_buffer[i-1]; - ucs_file_buffer[i-1] = (UChar)((BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8))); /*adjust if BIG_ENDIAN Corner Case*/ + myUChar = ucs_file_buffer[i-1]; + ucs_file_buffer[i-1] = (UChar)((BOM==0xFEFF)?myUChar:((myUChar >> 8) | (myUChar << 8))); /*adjust if BIG_ENDIAN Corner Case*/ + + UnicodeString* uniString = new UnicodeString(ucs_file_buffer,i); + UnicodeString* uniString3 = new UnicodeString(ucs_file_buffer,i); + UnicodeString* uniString2 = new UnicodeString(); + - UnicodeString* uniString = new UnicodeString(ucs_file_buffer,i); - UnicodeString* uniString3 = new UnicodeString(ucs_file_buffer,i); - UnicodeString* uniString2 = new UnicodeString(); - - /*Calls the Conversion Routine*/ testLong1 = MAX_FILE_LEN; @@ -453,125 +467,133 @@ void ConvertTest::TestConvert() myConverter->fromUnicodeString(output_cp_buffer, testLong1, *uniString, err); if (U_FAILURE(err)) logln("\nFAILURE..."); - - - /****************************************************************** - Checking ksc -> Unicode - ******************************************************************/ + + + /****************************************************************** + Checking ksc -> Unicode + ******************************************************************/ /*Clean up re-usable vars*/ - j=0; - - + + /*Calls the Conversion Routine*/ /*Uni1 ----ToUnicodeString----> Cp1 ----FromUnicodeString---->Uni2*/ logln("\n---Testing UnicodeConverter::toUnicodeString"); myConverter->toUnicodeString(*uniString2 , output_cp_buffer, testLong1, err); - if (U_FAILURE(err)) logln ("FAILURE! " + (UnicodeString)myErrorName(err)); + if (U_FAILURE(err)) + logln ("FAILURE! " + (UnicodeString)myErrorName(err)); - logln("\n---Testing UnicodeString RoundTrip ..."); - - /*check if Uni1 == Uni2*/ - if (uniString->compare(*uniString2)) errln("Equality check test failed"); - else logln("Equality check test ok"); + logln("\n---Testing UnicodeString RoundTrip ..."); - /*AIX Compiler hacks*/ - const UChar* tmp_ucs_buf = ucs_file_buffer_use; - //const UChar* tmp_consumedUni = NULL; - - myConverter->fromUnicode(mytarget_1, - mytarget + MAX_FILE_LEN, - tmp_ucs_buf, - ucs_file_buffer_use+i, - NULL, - TRUE, - err); - // consumedUni = (UChar*)tmp_consumedUni; - - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - - /*Uni1 ----ToUnicode----> Cp2 ----FromUnicode---->Uni3*/ + /*check if Uni1 == Uni2*/ + if (uniString->compare(*uniString2)) + errln("Equality check test failed"); + else + logln("Equality check test ok"); /*AIX Compiler hacks*/ - const char* tmp_mytarget_use = mytarget_use; - const char* tmp_consumed = consumed; - myConverter->toUnicode(my_ucs_file_buffer_1, - my_ucs_file_buffer + MAX_FILE_LEN, - tmp_mytarget_use, - mytarget_use+strlen((char*)mytarget_use), - NULL, - FALSE, - err); + const UChar* tmp_ucs_buf = ucs_file_buffer_use; + //const UChar* tmp_consumedUni = NULL; + + myConverter->fromUnicode(mytarget_1, + mytarget + MAX_FILE_LEN, + tmp_ucs_buf, + ucs_file_buffer_use+i, + NULL, + TRUE, + err); + // consumedUni = (UChar*)tmp_consumedUni; + + if (U_FAILURE(err)) + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); + + /*Uni1 ----ToUnicode----> Cp2 ----FromUnicode---->Uni3*/ + + /*AIX Compiler hacks*/ + const char* tmp_mytarget_use = mytarget_use; + const char* tmp_consumed = consumed; + myConverter->toUnicode(my_ucs_file_buffer_1, + my_ucs_file_buffer + MAX_FILE_LEN, + tmp_mytarget_use, + mytarget_use+strlen((char*)mytarget_use), + NULL, + FALSE, + err); consumed = (char*)tmp_consumed; - if (U_FAILURE(err)) errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - - - logln("\n---Testing UChar* RoundTrip ..."); - // uniString3->remove(); - uniString3->replace(0, uniString3->length(), my_ucs_file_buffer, i); - //uniString3 = new UnicodeString(my_ucs_file_buffer,i); - - /*checks if Uni1 == Uni3*/ - if (uniString->compare(*uniString3)) errln("Equality test failed line " + UnicodeString() + 500); - else logln("Equality test ok"); - - /*checks if Uni2 == Uni3 This is a sanity check for the consistency of the - UnicodeString and Unicode Convters*/ - logln("\n---Testing Consistency between UChar* and UnicodeString Conversion..."); - if (uniString2->compare(*uniString3)) errln("Equality test failed line " + UnicodeString() + 506); - else logln("Equality test ok"); - - logln("\n---Testing Regression 1100057 ..."); - const uint8_t mySJIS[12] = {0xFA, 0X51, 0XB8, 0XDB, 0XBD, 0XCB, 0XDB, 0XCC, 0XDE, 0XD0 , 0XFA, 0X50}; - - - UnicodeConverter SJIS(943, UCNV_IBM, err); - UnicodeString myString; + if (U_FAILURE(err)) + errln ("FAILURE! " + (UnicodeString)myErrorName(err)); - SJIS.toUnicodeString(myString, (const char *)mySJIS, 12, err); - if (U_FAILURE(err)||(myString.length()!=10)) errln("toUnicodeString test failed"); - else logln("toUnicodeString test ok"); + logln("\n---Testing UChar* RoundTrip ..."); + //uniString3->remove(); + uniString3->replace(0, uniString3->length(), my_ucs_file_buffer, i); + //uniString3 = new UnicodeString(my_ucs_file_buffer,i); - fclose(ucs_file_in); - delete myConverter; + /*checks if Uni1 == Uni3*/ + if (uniString->compare(*uniString3)) + errln("Equality test failed line " + UnicodeString() + 500); + else + logln("Equality test ok"); + + /*checks if Uni2 == Uni3 This is a sanity check for the consistency of the + UnicodeString and Unicode Convters*/ + logln("\n---Testing Consistency between UChar* and UnicodeString Conversion..."); + if (uniString2->compare(*uniString3)) + errln("Equality test failed line " + UnicodeString() + 506); + else + logln("Equality test ok"); + + logln("\n---Testing Regression 1100057 ..."); + const uint8_t mySJIS[12] = {0xFA, 0X51, 0XB8, 0XDB, 0XBD, 0XCB, 0XDB, 0XCC, 0XDE, 0XD0 , 0XFA, 0X50}; + + + UnicodeConverter SJIS(943, UCNV_IBM, err); + UnicodeString myString; + + + SJIS.toUnicodeString(myString, (const char *)mySJIS, 12, err); + if (U_FAILURE(err)||(myString.length()!=10)) + errln("toUnicodeString test failed"); + else + logln("toUnicodeString test ok"); + + fclose(ucs_file_in); + delete myConverter; //#ifndef WIN32 - delete uniString; - delete uniString2; - delete uniString3; - delete testUnistr; + delete uniString; + delete uniString2; + delete uniString3; + delete testUnistr; //#endif - + } } void WriteToFile(const UnicodeString *a, FILE *myfile) { - uint32_t size = a->length(); - uint16_t i = 0; - UChar b = 0xFEFF; + uint32_t size = a->length(); + uint16_t i = 0; + UChar b = 0xFEFF; - /*Writes the BOM*/ - fwrite(&b, sizeof(UChar), 1, myfile); - for (i=0; i< size; i++) - { - b = (*a)[i]; - fwrite(&b, sizeof(UChar), 1, myfile); - } - return; + /*Writes the BOM*/ + fwrite(&b, sizeof(UChar), 1, myfile); + for (i=0; i< size; i++) + { + b = (*a)[i]; + fwrite(&b, sizeof(UChar), 1, myfile); + } } - int32_t strCaseIcmp(const char* a1, const char * a2) { int32_t i=0, ret=0; while(a1[i]&&a2[i]) - { + { ret += tolower(a1[i])-tolower(a2[i]); i++; } @@ -583,12 +605,11 @@ UConverterFromUCallback otherUnicodeAction(UConverterFromUCallback MIA) return (MIA==(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP)?(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_SUBSTITUTE:(UConverterFromUCallback)UCNV_FROM_U_CALLBACK_STOP; } - UConverterToUCallback otherCharAction(UConverterToUCallback MIA) - { return (MIA==(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP)?(UConverterToUCallback)UCNV_TO_U_CALLBACK_SUBSTITUTE:(UConverterToUCallback)UCNV_TO_U_CALLBACK_STOP; } + void ConvertTest::TestAmbiguous() { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/currcoll.cpp b/icu4c/source/test/intltest/currcoll.cpp index 1a0a5392eb3..b14746fb1c9 100644 --- a/icu4c/source/test/intltest/currcoll.cpp +++ b/icu4c/source/test/intltest/currcoll.cpp @@ -34,7 +34,7 @@ CollationCurrencyTest::~CollationCurrencyTest() { } -void CollationCurrencyTest::currencyTest(char *par) +void CollationCurrencyTest::currencyTest(/*char *par*/) { // All the currency symbols, in collation order static const UChar currency[] = @@ -124,7 +124,7 @@ void CollationCurrencyTest::currencyTest(char *par) delete c; } -void CollationCurrencyTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) +void CollationCurrencyTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/) { if (exec) { @@ -133,7 +133,7 @@ void CollationCurrencyTest::runIndexedTest(int32_t index, UBool exec, const char switch (index) { - case 0: name = "currencyTest"; if (exec) currencyTest(par); break; + case 0: name = "currencyTest"; if (exec) currencyTest(/*par*/); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/currcoll.h b/icu4c/source/test/intltest/currcoll.h index dbf43631fd6..ae7edda3fab 100644 --- a/icu4c/source/test/intltest/currcoll.h +++ b/icu4c/source/test/intltest/currcoll.h @@ -42,7 +42,7 @@ public: virtual ~CollationCurrencyTest(); void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL); - void currencyTest(char *par); + void currencyTest(/*char *par*/); }; #endif diff --git a/icu4c/source/test/intltest/dacoll.cpp b/icu4c/source/test/intltest/dacoll.cpp index 352a5b51aab..6050cbdbc25 100644 --- a/icu4c/source/test/intltest/dacoll.cpp +++ b/icu4c/source/test/intltest/dacoll.cpp @@ -198,7 +198,7 @@ void CollationDanishTest::doTest( UnicodeString source, UnicodeString target, Co reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationDanishTest::TestTertiary( char* par ) +void CollationDanishTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -219,7 +219,7 @@ void CollationDanishTest::TestTertiary( char* par ) } } } -void CollationDanishTest::TestPrimary( char* par ) +void CollationDanishTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -228,12 +228,12 @@ void CollationDanishTest::TestPrimary( char* par ) } } -void CollationDanishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationDanishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationDanishTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/dacoll.h b/icu4c/source/test/intltest/dacoll.h index ec4e166c7d4..4de7865e186 100644 --- a/icu4c/source/test/intltest/dacoll.h +++ b/icu4c/source/test/intltest/dacoll.h @@ -39,10 +39,10 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform tests with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform test with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testBugs[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/dcfmapts.cpp b/icu4c/source/test/intltest/dcfmapts.cpp index b98f1016934..f81bfb943e4 100644 --- a/icu4c/source/test/intltest/dcfmapts.cpp +++ b/icu4c/source/test/intltest/dcfmapts.cpp @@ -14,7 +14,7 @@ // try to test the full functionality. It just calls each function in the class and // verifies that it works on a basic level. -void IntlTestDecimalFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestDecimalFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite DecimalFormatAPI"); switch (index) { @@ -26,13 +26,13 @@ void IntlTestDecimalFormatAPI::runIndexedTest( int32_t index, UBool exec, const if(U_FAILURE(status)) { errln((UnicodeString)"ERROR: Could not set default locale, test may not give correct results"); } - testAPI(par); + testAPI(/*par*/); } break; case 1: name = "Rounding test"; if(exec) { logln((UnicodeString)"DecimalFormat Rounding test---"); - testRounding(par); + testRounding(/*par*/); } break; @@ -44,7 +44,7 @@ void IntlTestDecimalFormatAPI::runIndexedTest( int32_t index, UBool exec, const * This test checks various generic API methods in DecimalFormat to achieve 100% * API coverage. */ -void IntlTestDecimalFormatAPI::testAPI(char *par) +void IntlTestDecimalFormatAPI::testAPI(/*char *par*/) { UErrorCode status = U_ZERO_ERROR; @@ -322,7 +322,7 @@ void IntlTestDecimalFormatAPI::testAPI(char *par) delete test; } -void IntlTestDecimalFormatAPI::testRounding(char *par) +void IntlTestDecimalFormatAPI::testRounding(/*char *par*/) { UErrorCode status = U_ZERO_ERROR; double Roundingnumber = 2.55; diff --git a/icu4c/source/test/intltest/dcfmapts.h b/icu4c/source/test/intltest/dcfmapts.h index 93712462397..d57fc199622 100644 --- a/icu4c/source/test/intltest/dcfmapts.h +++ b/icu4c/source/test/intltest/dcfmapts.h @@ -20,8 +20,8 @@ public: /** * Tests basic functionality of various API functions for DecimalFormat **/ - void testAPI(char *par); - void testRounding(char *par); + void testAPI(/*char *par*/); + void testRounding(/*char *par*/); private: /*Helper functions */ void verify(const UnicodeString& message, const UnicodeString& got, double expected); diff --git a/icu4c/source/test/intltest/decoll.cpp b/icu4c/source/test/intltest/decoll.cpp index 4284e3c7312..d5af05979ce 100644 --- a/icu4c/source/test/intltest/decoll.cpp +++ b/icu4c/source/test/intltest/decoll.cpp @@ -103,7 +103,7 @@ void CollationGermanTest::doTest( UnicodeString source, UnicodeString target, Co reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationGermanTest::TestTertiary( char* par ) +void CollationGermanTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -112,7 +112,7 @@ void CollationGermanTest::TestTertiary( char* par ) doTest(testSourceCases[i], testTargetCases[i], results[i][1]); } } -void CollationGermanTest::TestPrimary( char* par ) +void CollationGermanTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -122,13 +122,13 @@ void CollationGermanTest::TestPrimary( char* par ) } } -void CollationGermanTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationGermanTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationGermanTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/decoll.h b/icu4c/source/test/intltest/decoll.h index 435397a91e3..a96f754dff9 100644 --- a/icu4c/source/test/intltest/decoll.h +++ b/icu4c/source/test/intltest/decoll.h @@ -37,13 +37,13 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform test with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform test with strength SECONDARY - void TestSecondary( char* par ); + void TestSecondary(/* char* par */); // perform tests with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testSourceCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/dtfmapts.cpp b/icu4c/source/test/intltest/dtfmapts.cpp index 56df34e2ad9..a5d79f9533b 100644 --- a/icu4c/source/test/intltest/dtfmapts.cpp +++ b/icu4c/source/test/intltest/dtfmapts.cpp @@ -19,7 +19,7 @@ // try to test the full functionality. It just calls each function in the class and // verifies that it works on a basic level. -void IntlTestDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite DateFormatAPI"); switch (index) { @@ -31,7 +31,7 @@ void IntlTestDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const cha if(U_FAILURE(status)) { errln("ERROR: Could not set default locale, test may not give correct results"); } - testAPI(par); + testAPI(/*par*/); } break; @@ -85,7 +85,7 @@ void IntlTestDateFormatAPI::TestEquals(void) * This test checks various generic API methods in DateFormat to achieve 100% * API coverage. */ -void IntlTestDateFormatAPI::testAPI(char *par) +void IntlTestDateFormatAPI::testAPI(/* char* par */) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/dtfmapts.h b/icu4c/source/test/intltest/dtfmapts.h index ef85509b781..b05a5d08284 100644 --- a/icu4c/source/test/intltest/dtfmapts.h +++ b/icu4c/source/test/intltest/dtfmapts.h @@ -24,7 +24,7 @@ private: /** * Tests basic functionality of various generic API methods in DateFormat */ - void testAPI(char *par); + void testAPI(/* char* par */); /** * Test that the equals method works correctly. */ diff --git a/icu4c/source/test/intltest/dtfmrgts.cpp b/icu4c/source/test/intltest/dtfmrgts.cpp index a21b7cc384f..380de273448 100644 --- a/icu4c/source/test/intltest/dtfmrgts.cpp +++ b/icu4c/source/test/intltest/dtfmrgts.cpp @@ -21,7 +21,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -DateFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +DateFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite DateFormatRegressionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/dtfmtrtts.cpp b/icu4c/source/test/intltest/dtfmtrtts.cpp index cc5684a432e..a730a152d45 100644 --- a/icu4c/source/test/intltest/dtfmtrtts.cpp +++ b/icu4c/source/test/intltest/dtfmtrtts.cpp @@ -33,7 +33,7 @@ int32_t DateFormatRoundTripTest::DEPTH = 5; #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -DateFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +DateFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index 7c34b195af7..88868085d4b 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -17,7 +17,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; -void DateFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void DateFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite DateFormatTest"); switch (index) { diff --git a/icu4c/source/test/intltest/encoll.cpp b/icu4c/source/test/intltest/encoll.cpp index fe29002cfcf..8f2cde7dabd 100644 --- a/icu4c/source/test/intltest/encoll.cpp +++ b/icu4c/source/test/intltest/encoll.cpp @@ -268,7 +268,7 @@ void CollationEnglishTest::doTest( UnicodeString source, UnicodeString target, C reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationEnglishTest::TestTertiary( char* par ) +void CollationEnglishTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -305,7 +305,7 @@ void CollationEnglishTest::TestTertiary( char* par ) } -void CollationEnglishTest::TestPrimary( char* par ) +void CollationEnglishTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -315,7 +315,7 @@ void CollationEnglishTest::TestPrimary( char* par ) } } -void CollationEnglishTest::TestSecondary( char* par ) +void CollationEnglishTest::TestSecondary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::SECONDARY); @@ -343,13 +343,13 @@ void CollationEnglishTest::TestSecondary( char* par ) } } -void CollationEnglishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationEnglishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationEnglishTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestSecondary"; if (exec) TestSecondary( par ); break; - case 2: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break; + case 2: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/encoll.h b/icu4c/source/test/intltest/encoll.h index aca21ea703a..5abf5659b4c 100644 --- a/icu4c/source/test/intltest/encoll.h +++ b/icu4c/source/test/intltest/encoll.h @@ -39,13 +39,13 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // performs test with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform test with strength SECONDARY - void TestSecondary( char* par ); + void TestSecondary(/* char* par */); // perform test with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testBugs[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/escoll.cpp b/icu4c/source/test/intltest/escoll.cpp index 5a6dafcdde3..b3f41d47aaf 100644 --- a/icu4c/source/test/intltest/escoll.cpp +++ b/icu4c/source/test/intltest/escoll.cpp @@ -89,7 +89,7 @@ void CollationSpanishTest::doTest( UnicodeString source, UnicodeString target, C reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationSpanishTest::TestTertiary( char* par ) +void CollationSpanishTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -97,7 +97,7 @@ void CollationSpanishTest::TestTertiary( char* par ) doTest(testSourceCases[i], testTargetCases[i], results[i]); } } -void CollationSpanishTest::TestPrimary( char* par ) +void CollationSpanishTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -106,12 +106,12 @@ void CollationSpanishTest::TestPrimary( char* par ) } } -void CollationSpanishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationSpanishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par */) { if (exec) logln("TestSuite CollationSpanishTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/escoll.h b/icu4c/source/test/intltest/escoll.h index 7f5d59fad0d..091790ad1b9 100644 --- a/icu4c/source/test/intltest/escoll.h +++ b/icu4c/source/test/intltest/escoll.h @@ -39,10 +39,10 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // performs tests with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // prforms test with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testSourceCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/ficoll.cpp b/icu4c/source/test/intltest/ficoll.cpp index 268880f0fdd..eb25a6dc6ad 100644 --- a/icu4c/source/test/intltest/ficoll.cpp +++ b/icu4c/source/test/intltest/ficoll.cpp @@ -76,7 +76,7 @@ void CollationFinnishTest::doTest( UnicodeString source, UnicodeString target, C reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationFinnishTest::TestTertiary( char* par ) +void CollationFinnishTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -84,7 +84,7 @@ void CollationFinnishTest::TestTertiary( char* par ) doTest(testSourceCases[i], testTargetCases[i], results[i]); } } -void CollationFinnishTest::TestPrimary( char* par ) +void CollationFinnishTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -93,12 +93,12 @@ void CollationFinnishTest::TestPrimary( char* par ) } } -void CollationFinnishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationFinnishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationFinnishTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/ficoll.h b/icu4c/source/test/intltest/ficoll.h index 3c695071adc..adc0616c835 100644 --- a/icu4c/source/test/intltest/ficoll.h +++ b/icu4c/source/test/intltest/ficoll.h @@ -38,10 +38,10 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform tests with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform test with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testSourceCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/frcoll.cpp b/icu4c/source/test/intltest/frcoll.cpp index fdec2e1efb1..94e1874debe 100644 --- a/icu4c/source/test/intltest/frcoll.cpp +++ b/icu4c/source/test/intltest/frcoll.cpp @@ -146,7 +146,7 @@ void CollationFrenchTest::doTest( UnicodeString source, UnicodeString target, Co reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationFrenchTest::TestTertiary( char* par ) +void CollationFrenchTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -156,7 +156,7 @@ void CollationFrenchTest::TestTertiary( char* par ) } } -void CollationFrenchTest::TestSecondary( char* par ) +void CollationFrenchTest::TestSecondary(/* char* par */) { //test acute and grave ordering int32_t i = 0; @@ -178,7 +178,7 @@ void CollationFrenchTest::TestSecondary( char* par ) } } -void CollationFrenchTest::TestExtra( char* par ) +void CollationFrenchTest::TestExtra(/* char* par */) { int32_t i, j; myCollation->setStrength(Collator::TERTIARY); @@ -191,13 +191,13 @@ void CollationFrenchTest::TestExtra( char* par ) } } -void CollationFrenchTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationFrenchTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationFrenchTest: "); switch (index) { - case 0: name = "TestSecondary"; if (exec) TestSecondary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; - case 2: name = "TestExtra"; if (exec) TestExtra( par ); break; + case 0: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; + case 2: name = "TestExtra"; if (exec) TestExtra(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/frcoll.h b/icu4c/source/test/intltest/frcoll.h index 39fb28bd358..41361b6d34b 100644 --- a/icu4c/source/test/intltest/frcoll.h +++ b/icu4c/source/test/intltest/frcoll.h @@ -37,13 +37,13 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform tests with strength SECONDARY - void TestSecondary( char* par ); + void TestSecondary(/* char* par */); // perform tests with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); // perform extra tests - void TestExtra( char* par ); + void TestExtra(/* char* par */); private: static const UChar testSourceCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/g7coll.cpp b/icu4c/source/test/intltest/g7coll.cpp index b2bcaf657a7..b9258262345 100644 --- a/icu4c/source/test/intltest/g7coll.cpp +++ b/icu4c/source/test/intltest/g7coll.cpp @@ -104,7 +104,7 @@ void G7CollationTest::doTest( Collator* myCollation, UnicodeString source, Unico reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void G7CollationTest::TestG7Locales( char* par ) +void G7CollationTest::TestG7Locales(/* char* par */) { int32_t i; @@ -164,7 +164,7 @@ void G7CollationTest::TestG7Locales( char* par ) } } -void G7CollationTest::TestDemo1( char* par ) +void G7CollationTest::TestDemo1(/* char* par */) { logln("Demo Test 1 : Create a new table collation with rules \"& Z < p, P\""); UErrorCode status = U_ZERO_ERROR; @@ -193,7 +193,7 @@ void G7CollationTest::TestDemo1( char* par ) delete col; } -void G7CollationTest::TestDemo2( char* par ) +void G7CollationTest::TestDemo2(/* char* par */) { logln("Demo Test 2 : Create a new table collation with rules \"& C < ch , cH, Ch, CH\""); UErrorCode status = U_ZERO_ERROR; @@ -222,7 +222,7 @@ void G7CollationTest::TestDemo2( char* par ) delete col; } -void G7CollationTest::TestDemo3( char* par ) +void G7CollationTest::TestDemo3(/* char* par */) { logln("Demo Test 3 : Create a new table collation with rules \"& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'\""); UErrorCode status = U_ZERO_ERROR; @@ -251,7 +251,7 @@ void G7CollationTest::TestDemo3( char* par ) delete col; } -void G7CollationTest::TestDemo4( char* par ) +void G7CollationTest::TestDemo4(/* char* par */) { logln("Demo Test 4 : Create a new table collation with rules \" & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' \""); UErrorCode status = U_ZERO_ERROR; @@ -280,15 +280,15 @@ void G7CollationTest::TestDemo4( char* par ) delete col; } -void G7CollationTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void G7CollationTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite G7CollationTest: "); switch (index) { - case 0: name = "TestG7Locales"; if (exec) TestG7Locales( par ); break; - case 1: name = "TestDemo1"; if (exec) TestDemo1( par ); break; - case 2: name = "TestDemo2"; if (exec) TestDemo2( par ); break; - case 3: name = "TestDemo3"; if (exec) TestDemo3( par ); break; - case 4: name = "TestDemo4"; if (exec) TestDemo4( par ); break; + case 0: name = "TestG7Locales"; if (exec) TestG7Locales(/* par */); break; + case 1: name = "TestDemo1"; if (exec) TestDemo1(/* par */); break; + case 2: name = "TestDemo2"; if (exec) TestDemo2(/* par */); break; + case 3: name = "TestDemo3"; if (exec) TestDemo3(/* par */); break; + case 4: name = "TestDemo4"; if (exec) TestDemo4(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/g7coll.h b/icu4c/source/test/intltest/g7coll.h index c2060f116f0..0b2fc1a97de 100644 --- a/icu4c/source/test/intltest/g7coll.h +++ b/icu4c/source/test/intltest/g7coll.h @@ -63,21 +63,21 @@ public: void doTest( Collator* col, UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform test for G7 locales - void TestG7Locales( char* par ); + void TestG7Locales(/* char* par */); // perform test with added rules " & Z < p, P" - void TestDemo1( char* par ); + void TestDemo1(/* char* par */); // perorm test with added rules "& C < ch , cH, Ch, CH" - void TestDemo2( char* par ); + void TestDemo2(/* char* par */); // perform test with added rules // "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'" - void TestDemo3( char* par ); + void TestDemo3(/* char* par */); // perform test with added rules // " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' " - void TestDemo4( char* par ); + void TestDemo4(/* char* par */); private: static const UChar testCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/hajatrts.cpp b/icu4c/source/test/intltest/hajatrts.cpp index 3908277faaf..0c5e7430ead 100644 --- a/icu4c/source/test/intltest/hajatrts.cpp +++ b/icu4c/source/test/intltest/hajatrts.cpp @@ -37,7 +37,7 @@ static int32_t getInt(UnicodeString str) // runIndexedTest //--------------------------------------------- -void HangToJamoTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void HangToJamoTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite HangToJamoul Transliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/hxuntrts.cpp b/icu4c/source/test/intltest/hxuntrts.cpp index bcc58dbbcdb..bee30a0cc3e 100644 --- a/icu4c/source/test/intltest/hxuntrts.cpp +++ b/icu4c/source/test/intltest/hxuntrts.cpp @@ -38,7 +38,7 @@ static int32_t getInt(UnicodeString str) // runIndexedTest //--------------------------------------------- -void HexToUniTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void HexToUniTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite HexadecimalToUnicode Transliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/isocoll.cpp b/icu4c/source/test/intltest/isocoll.cpp index c0e147a4fdc..ea2c3f7bddb 100644 --- a/icu4c/source/test/intltest/isocoll.cpp +++ b/icu4c/source/test/intltest/isocoll.cpp @@ -7015,7 +7015,7 @@ CollationISOTest::~CollationISOTest() delete myCollation; } -void CollationISOTest::TestAll( char* par ) +void CollationISOTest::TestAll(/* char* par */) { int32_t i = 0; @@ -7109,11 +7109,11 @@ void CollationISOTest::TestAll( char* par ) } } -void CollationISOTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationISOTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationISOTest: "); switch (index) { - case 0: name = "TestAll"; if (exec) TestAll( par ); break; + case 0: name = "TestAll"; if (exec) TestAll(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/isocoll.h b/icu4c/source/test/intltest/isocoll.h index 6763b7d54fe..0d3f68e4823 100644 --- a/icu4c/source/test/intltest/isocoll.h +++ b/icu4c/source/test/intltest/isocoll.h @@ -38,7 +38,7 @@ public: void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // test proper comparing for 3774 entries of ISO 14651 characters - void TestAll( char* par ); + void TestAll(/* char* par */); private: void quickSort(CollationKey** keyArray, int *indexes, int lo0, int hi0); diff --git a/icu4c/source/test/intltest/itercoll.cpp b/icu4c/source/test/intltest/itercoll.cpp index a59de62cd6c..06bbb88846e 100644 --- a/icu4c/source/test/intltest/itercoll.cpp +++ b/icu4c/source/test/intltest/itercoll.cpp @@ -49,7 +49,7 @@ CollationIteratorTest::~CollationIteratorTest() * @bug 4108758 - Make sure it works with contracting characters * */ -void CollationIteratorTest::TestPrevious(char *par) +void CollationIteratorTest::TestPrevious(/* char* par */) { UErrorCode status = U_ZERO_ERROR; CollationElementIterator *iter = en_us->createCollationElementIterator(test1); @@ -139,7 +139,7 @@ void CollationIteratorTest::TestPrevious(char *par) /** * Test for getOffset() and setOffset() */ -void CollationIteratorTest::TestOffset(char *par) +void CollationIteratorTest::TestOffset(/* char* par */) { CollationElementIterator *iter = en_us->createCollationElementIterator(test1); @@ -182,7 +182,7 @@ void CollationIteratorTest::TestOffset(char *par) /** * Test for setText() */ -void CollationIteratorTest::TestSetText(char *par) +void CollationIteratorTest::TestSetText(/* char* par */) { CollationElementIterator *iter1 = en_us->createCollationElementIterator(test1); CollationElementIterator *iter2 = en_us->createCollationElementIterator(test2); @@ -235,7 +235,7 @@ void CollationIteratorTest::TestSetText(char *par) /** @bug 4108762 * Test for getMaxExpansion() */ -void CollationIteratorTest::TestMaxExpansion(char *par) +void CollationIteratorTest::TestMaxExpansion(/* char* par */) { // Try a simple one first: // The only expansion ends with 'e' and has length 2 @@ -268,7 +268,7 @@ void CollationIteratorTest::TestMaxExpansion(char *par) /* * @bug 4157299 */ -void CollationIteratorTest::TestClearBuffers(char *par) +void CollationIteratorTest::TestClearBuffers(/* char* par */) { UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *c = NULL; @@ -571,7 +571,7 @@ void CollationIteratorTest::assertEqual(CollationElementIterator &i1, CollationE while (c1 != CollationElementIterator::NULLORDER); } -void CollationIteratorTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) +void CollationIteratorTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/) { if (exec) { @@ -580,11 +580,11 @@ void CollationIteratorTest::runIndexedTest(int32_t index, UBool exec, const char switch (index) { - case 0: name = "TestPrevious"; if (exec) TestPrevious(par); break; - case 1: name = "TestOffset"; if (exec) TestOffset(par); break; - case 2: name = "TestSetText"; if (exec) TestSetText(par); break; - case 3: name = "TestMaxExpansion"; if (exec) TestMaxExpansion(par); break; - case 4: name = "TestClearBuffers"; if (exec) TestClearBuffers(par); break; + case 0: name = "TestPrevious"; if (exec) TestPrevious(/* par */); break; + case 1: name = "TestOffset"; if (exec) TestOffset(/* par */); break; + case 2: name = "TestSetText"; if (exec) TestSetText(/* par */); break; + case 3: name = "TestMaxExpansion"; if (exec) TestMaxExpansion(/* par */); break; + case 4: name = "TestClearBuffers"; if (exec) TestClearBuffers(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/itercoll.h b/icu4c/source/test/intltest/itercoll.h index a08a437ffb9..f3bc4c3df48 100644 --- a/icu4c/source/test/intltest/itercoll.h +++ b/icu4c/source/test/intltest/itercoll.h @@ -53,27 +53,27 @@ public: * @bug 4108758 - Make sure it works with contracting characters * */ - void TestPrevious(char *par); + void TestPrevious(/* char* par */); /** * Test for getOffset() and setOffset() */ - void TestOffset(char *par); + void TestOffset(/* char* par */); /** * Test for setText() */ - void TestSetText(char *par); + void TestSetText(/* char* par */); /** @bug 4108762 * Test for getMaxExpansion() */ - void TestMaxExpansion(char *par); + void TestMaxExpansion(/* char* par */); /* * @bug 4157299 */ - void TestClearBuffers(char *par); + void TestClearBuffers(/* char* par */); //------------------------------------------------------------------------ // Internal utilities diff --git a/icu4c/source/test/intltest/ittxtbd.cpp b/icu4c/source/test/intltest/ittxtbd.cpp index c80d1d50d56..a55f138a0b9 100644 --- a/icu4c/source/test/intltest/ittxtbd.cpp +++ b/icu4c/source/test/intltest/ittxtbd.cpp @@ -1057,7 +1057,7 @@ void IntlTestTextBoundary::TestPreceding() // runIndexedTest //--------------------------------------------- -void IntlTestTextBoundary::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestTextBoundary::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite TextBoundary: "); switch (index) { diff --git a/icu4c/source/test/intltest/jacoll.cpp b/icu4c/source/test/intltest/jacoll.cpp index 232392c7ec0..5b4db5fb4fa 100644 --- a/icu4c/source/test/intltest/jacoll.cpp +++ b/icu4c/source/test/intltest/jacoll.cpp @@ -93,7 +93,7 @@ void CollationKanaTest::doTest( UnicodeString source, UnicodeString target, Coll reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationKanaTest::TestTertiary( char* par ) +void CollationKanaTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -102,11 +102,11 @@ void CollationKanaTest::TestTertiary( char* par ) } } -void CollationKanaTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationKanaTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationKanaTest: "); switch (index) { - case 0: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/jacoll.h b/icu4c/source/test/intltest/jacoll.h index 32209cb3b2d..f85c938aacd 100644 --- a/icu4c/source/test/intltest/jacoll.h +++ b/icu4c/source/test/intltest/jacoll.h @@ -38,7 +38,7 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // performs test with strength TERIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: static const UChar testSourceCases[][MAX_TOKEN_LEN]; diff --git a/icu4c/source/test/intltest/jahatrts.cpp b/icu4c/source/test/intltest/jahatrts.cpp index eff68c78dcd..0da426ca837 100644 --- a/icu4c/source/test/intltest/jahatrts.cpp +++ b/icu4c/source/test/intltest/jahatrts.cpp @@ -36,7 +36,7 @@ static int32_t getInt(UnicodeString str) // runIndexedTest //--------------------------------------------- -void JamoToHangTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void JamoToHangTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite JamoToHangul Transliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/loctest.cpp b/icu4c/source/test/intltest/loctest.cpp index 09c7d0b3cdd..0b775d204cf 100644 --- a/icu4c/source/test/intltest/loctest.cpp +++ b/icu4c/source/test/intltest/loctest.cpp @@ -146,7 +146,7 @@ LocaleTest::~LocaleTest() #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; -void LocaleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void LocaleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite LocaleTest: "); switch (index) { diff --git a/icu4c/source/test/intltest/miscdtfm.cpp b/icu4c/source/test/intltest/miscdtfm.cpp index 8501305d866..7ed13c2eb84 100644 --- a/icu4c/source/test/intltest/miscdtfm.cpp +++ b/icu4c/source/test/intltest/miscdtfm.cpp @@ -24,7 +24,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -DateFormatMiscTests::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +DateFormatMiscTests::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite DateFormatMiscTests"); switch (index) { @@ -48,7 +48,7 @@ DateFormatMiscTests::failure(UErrorCode status, const char* msg) } /* - * @test @(#)$RCSfile: miscdtfm.cpp,v $ $Revision: 1.11 $ $Date: 2000/08/14 21:42:35 $ + * @test @(#)$RCSfile: miscdtfm.cpp,v $ $Revision: 1.12 $ $Date: 2000/08/23 19:11:16 $ * * @bug 4097450 */ @@ -140,7 +140,7 @@ DateFormatMiscTests::test4097450() } /* - * @test @(#)$RCSfile: miscdtfm.cpp,v $ $Revision: 1.11 $ $Date: 2000/08/14 21:42:35 $ + * @test @(#)$RCSfile: miscdtfm.cpp,v $ $Revision: 1.12 $ $Date: 2000/08/23 19:11:16 $ * * @bug 4099975 */ diff --git a/icu4c/source/test/intltest/mnkytst.cpp b/icu4c/source/test/intltest/mnkytst.cpp index 06215b2eecb..a5202562f84 100644 --- a/icu4c/source/test/intltest/mnkytst.cpp +++ b/icu4c/source/test/intltest/mnkytst.cpp @@ -80,7 +80,7 @@ CollationMonkeyTest::checkValue(int32_t value) return value; } -void CollationMonkeyTest::TestCollationKey( char* par ) +void CollationMonkeyTest::TestCollationKey(/* char* par */) { if(source.length() == 0) { errln(UNICODE_STRING("CollationMonkeyTest::TestCollationKey(): source is empty - ICU_DATA not set or data missing?", 92)); @@ -152,7 +152,7 @@ void CollationMonkeyTest::TestCollationKey( char* par ) } void -CollationMonkeyTest::TestCompare(char* par) +CollationMonkeyTest::TestCompare(/* char* par */) { if(source.length() == 0) { errln(UNICODE_STRING("CollationMonkeyTest::TestCompare(): source is empty - ICU_DATA not set or data missing?", 87)); @@ -214,7 +214,7 @@ CollationMonkeyTest::TestCompare(char* par) errln(msg); } } -void CollationMonkeyTest::TestRules(char *par){ +void CollationMonkeyTest::TestRules(/* char* par */){ UChar testSourceCases[][10] = { {0x0061, 0x0062, 0x007a, 0}, {0x0061, 0x0062, 0x007a, 0}, @@ -277,13 +277,13 @@ void CollationMonkeyTest::doTest(RuleBasedCollator *myCollation, UnicodeString m reportCResult( mysource, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationMonkeyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationMonkeyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationMonkeyTest: "); switch (index) { - case 0: name = "TestCompare"; if (exec) TestCompare( par ); break; - case 1: name = "TestCollationKey"; if (exec) TestCollationKey( par ); break; - case 2: name = "TestRules"; if (exec) TestRules(par); break; + case 0: name = "TestCompare"; if (exec) TestCompare(/* par */); break; + case 1: name = "TestCollationKey"; if (exec) TestCollationKey(/* par */); break; + case 2: name = "TestRules"; if (exec) TestRules(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/mnkytst.h b/icu4c/source/test/intltest/mnkytst.h index a344610d33c..28aa5bee296 100644 --- a/icu4c/source/test/intltest/mnkytst.h +++ b/icu4c/source/test/intltest/mnkytst.h @@ -39,12 +39,12 @@ public: int32_t checkValue(int32_t value); // perform monkey tests using Collator::compare - void TestCompare( char* par ); + void TestCompare(/* char* par */); // perform monkey tests using CollationKey::compareTo - void TestCollationKey( char* par ); + void TestCollationKey(/* char* par */); - void TestRules(char* par); + void TestRules(/* char* par */); private: void report(UnicodeString& s, UnicodeString& t, int32_t result, int32_t revResult); diff --git a/icu4c/source/test/intltest/msfmrgts.cpp b/icu4c/source/test/intltest/msfmrgts.cpp index 047978a2e48..cc019f7c70b 100644 --- a/icu4c/source/test/intltest/msfmrgts.cpp +++ b/icu4c/source/test/intltest/msfmrgts.cpp @@ -21,7 +21,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -MessageFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +MessageFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite MessageFormatRegressionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/nmfmapts.cpp b/icu4c/source/test/intltest/nmfmapts.cpp index 571747e58e7..552162e01c1 100644 --- a/icu4c/source/test/intltest/nmfmapts.cpp +++ b/icu4c/source/test/intltest/nmfmapts.cpp @@ -15,7 +15,7 @@ // try to test the full functionality. It just calls each function in the class and // verifies that it works on a basic level. -void IntlTestNumberFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestNumberFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite NumberFormatAPI"); switch (index) { @@ -27,7 +27,7 @@ void IntlTestNumberFormatAPI::runIndexedTest( int32_t index, UBool exec, const c if(U_FAILURE(status)) { errln("ERROR: Could not set default locale, test may not give correct results"); } - testAPI(par); + testAPI(/* par */); } break; @@ -39,7 +39,7 @@ void IntlTestNumberFormatAPI::runIndexedTest( int32_t index, UBool exec, const c * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of * NumberFormat. */ -void IntlTestNumberFormatAPI::testAPI(char *par) +void IntlTestNumberFormatAPI::testAPI(/* char* par */) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/nmfmapts.h b/icu4c/source/test/intltest/nmfmapts.h index c6d4ff09763..1a87c4bc977 100644 --- a/icu4c/source/test/intltest/nmfmapts.h +++ b/icu4c/source/test/intltest/nmfmapts.h @@ -22,7 +22,7 @@ private: /** * executes tests of API functions, see detailed comments in source code **/ - void testAPI(char *par); + void testAPI(/* char* par */); }; #endif diff --git a/icu4c/source/test/intltest/nmfmtrt.cpp b/icu4c/source/test/intltest/nmfmtrt.cpp index 64dcd06f413..46aa66e509c 100644 --- a/icu4c/source/test/intltest/nmfmtrt.cpp +++ b/icu4c/source/test/intltest/nmfmtrt.cpp @@ -27,7 +27,7 @@ double NumberFormatRoundTripTest::min_numeric_error = 1.0; #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; -void NumberFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void NumberFormatRoundTripTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite NumberFormatRoundTripTest"); switch (index) { diff --git a/icu4c/source/test/intltest/normconf.cpp b/icu4c/source/test/intltest/normconf.cpp index 7d3217b7fcf..a43b385cad8 100644 --- a/icu4c/source/test/intltest/normconf.cpp +++ b/icu4c/source/test/intltest/normconf.cpp @@ -23,7 +23,7 @@ } \ break -void NormalizerConformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) { +void NormalizerConformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/) { switch (index) { CASE(0,TestConformance); // CASE(1,TestCase6); diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 49892092e2d..e45c2047924 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -22,7 +22,7 @@ #define CHECK(status,str) if (U_FAILURE(status)) { errln(UnicodeString("FAIL: ") + str); return; } -void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite DateFormatTest"); switch (index) { @@ -206,8 +206,10 @@ NumberFormatTest::TestExponential(void) useEpsilon = TRUE; #endif } - else + else { errln((UnicodeString)"FAIL: Non-numeric Formattable returned"); + continue; + } if (pos.getIndex() == s.length()) { logln((UnicodeString)" -parse-> " + a); diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index b4c4fa5a609..b668dc827aa 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -23,7 +23,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -NumberFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +NumberFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/pptest.cpp b/icu4c/source/test/intltest/pptest.cpp index b23e28b3410..371b83a80b9 100644 --- a/icu4c/source/test/intltest/pptest.cpp +++ b/icu4c/source/test/intltest/pptest.cpp @@ -15,7 +15,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; -void ParsePositionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void ParsePositionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite ParsePositionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/rbbiapts.cpp b/icu4c/source/test/intltest/rbbiapts.cpp index 67d338e963d..299bf4921ea 100644 --- a/icu4c/source/test/intltest/rbbiapts.cpp +++ b/icu4c/source/test/intltest/rbbiapts.cpp @@ -547,7 +547,7 @@ void RBBIAPITest::TestIsBoundary(){ // runIndexedTest //--------------------------------------------- -void RBBIAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void RBBIAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite RuleBasedBreakIterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/rbbitst.cpp b/icu4c/source/test/intltest/rbbitst.cpp index fecd94d002c..5c84f4d815b 100644 --- a/icu4c/source/test/intltest/rbbitst.cpp +++ b/icu4c/source/test/intltest/rbbitst.cpp @@ -915,7 +915,7 @@ void RBBITest::TestAbbrRuleBasedWordIteration() // runIndexedTest //--------------------------------------------- -void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite RuleBasedBreakIterator: "); switch (index) { diff --git a/icu4c/source/test/intltest/regcoll.cpp b/icu4c/source/test/intltest/regcoll.cpp index 066ac45380f..08fca810925 100644 --- a/icu4c/source/test/intltest/regcoll.cpp +++ b/icu4c/source/test/intltest/regcoll.cpp @@ -48,7 +48,7 @@ CollationRegressionTest::~CollationRegressionTest() // // CollationElementIterator.reset() doesn't work // -void CollationRegressionTest::Test4048446(char *par) +void CollationRegressionTest::Test4048446(/* char* par */) { CollationElementIterator *i1 = en_us->createCollationElementIterator(test1); CollationElementIterator *i2 = en_us->createCollationElementIterator(test1); @@ -86,7 +86,7 @@ void CollationRegressionTest::Test4048446(char *par) // // Collator -> rules -> Collator round-trip broken for expanding characters // -void CollationRegressionTest::Test4051866(char *par) +void CollationRegressionTest::Test4051866(/* char* par */) { /* RuleBasedCollator c1 = new RuleBasedCollator("< o " @@ -132,7 +132,7 @@ void CollationRegressionTest::Test4051866(char *par) // // Collator thinks "black-bird" == "black" // -void CollationRegressionTest::Test4053636(char *par) +void CollationRegressionTest::Test4053636(/* char* par */) { if (en_us->equals("black_bird", "black")) { @@ -145,7 +145,7 @@ void CollationRegressionTest::Test4053636(char *par) // CollationElementIterator will not work correctly if the associated // Collator object's mode is changed // -void CollationRegressionTest::Test4054238(char *par) +void CollationRegressionTest::Test4054238(/* char* par */) { RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone(); @@ -170,7 +170,7 @@ void CollationRegressionTest::Test4054238(char *par) // // Collator::IDENTICAL documented but not implemented // -void CollationRegressionTest::Test4054734(char *par) +void CollationRegressionTest::Test4054734(/* char* par */) { /* Here's the original Java: @@ -217,7 +217,7 @@ void CollationRegressionTest::Test4054734(char *par) // // Full Decomposition mode not implemented // -void CollationRegressionTest::Test4054736(char *par) +void CollationRegressionTest::Test4054736(/* char* par */) { RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone(); @@ -237,7 +237,7 @@ void CollationRegressionTest::Test4054736(char *par) // // Collator::createInstance() causes an ArrayIndexOutofBoundsException for Korean // -void CollationRegressionTest::Test4058613(char *par) +void CollationRegressionTest::Test4058613(/* char* par */) { // Creating a default collator doesn't work when Korean is the default // locale @@ -282,7 +282,7 @@ void CollationRegressionTest::Test4058613(char *par) // RuleBasedCollator.getRules does not return the exact pattern as input // for expanding character sequences // -void CollationRegressionTest::Test4059820(char *par) +void CollationRegressionTest::Test4059820(/* char* par */) { UErrorCode status = U_ZERO_ERROR; @@ -310,7 +310,7 @@ void CollationRegressionTest::Test4059820(char *par) // // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I" // -void CollationRegressionTest::Test4060154(char *par) +void CollationRegressionTest::Test4060154(/* char* par */) { UErrorCode status = U_ZERO_ERROR; UnicodeString rules; @@ -381,7 +381,7 @@ void CollationRegressionTest::Test4060154(char *par) // // Secondary/Tertiary comparison incorrect in French Secondary // -void CollationRegressionTest::Test4062418(char *par) +void CollationRegressionTest::Test4062418(/* char* par */) { UErrorCode status = U_ZERO_ERROR; @@ -417,7 +417,7 @@ void CollationRegressionTest::Test4062418(char *par) // // Collator::compare() method broken if either string contains spaces // -void CollationRegressionTest::Test4065540(char *par) +void CollationRegressionTest::Test4065540(/* char* par */) { if (en_us->compare("abcd e", "abcd f") == 0) { @@ -431,7 +431,7 @@ void CollationRegressionTest::Test4065540(char *par) // correct result. For example, // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300. // -void CollationRegressionTest::Test4066189(char *par) +void CollationRegressionTest::Test4066189(/* char* par */) { static const UChar chars1[] = {0x1EB1, 0}; static const UChar chars2[] = {0x61, 0x0306, 0x0300, 0}; @@ -461,7 +461,7 @@ void CollationRegressionTest::Test4066189(char *par) // // French secondary collation checking at the end of compare iteration fails // -void CollationRegressionTest::Test4066696(char *par) +void CollationRegressionTest::Test4066696(/* char* par */) { UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *c = NULL; @@ -497,7 +497,7 @@ void CollationRegressionTest::Test4066696(char *par) // // Bad canonicalization of same-class combining characters // -void CollationRegressionTest::Test4076676(char *par) +void CollationRegressionTest::Test4076676(/* char* par */) { // These combining characters are all in the same class, so they should not // be reordered, and they should compare as unequal. @@ -519,7 +519,7 @@ void CollationRegressionTest::Test4076676(char *par) // // RuleBasedCollator::operator==(NULL) throws NullPointerException // -void CollationRegressionTest::Test4079231(char *par) +void CollationRegressionTest::Test4079231(/* char* par */) { // I don't think there's any way to write this test // in C++. The following is equivalent to the Java, @@ -547,7 +547,7 @@ void CollationRegressionTest::Test4079231(char *par) // // RuleBasedCollator breaks on "< a < bb" rule // -void CollationRegressionTest::Test4078588(char *par) +void CollationRegressionTest::Test4078588(/* char *par */) { UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *rbc = new RuleBasedCollator((UnicodeString)"< a < bb", status); @@ -578,7 +578,7 @@ void CollationRegressionTest::Test4078588(char *par) // // Combining characters in different classes not reordered properly. // -void CollationRegressionTest::Test4081866(char *par) +void CollationRegressionTest::Test4081866(/* char* par */) { // These combining characters are all in different classes, // so they should be reordered and the strings should compare as equal. @@ -605,7 +605,7 @@ void CollationRegressionTest::Test4081866(char *par) // // string comparison errors in Scandinavian collators // -void CollationRegressionTest::Test4087241(char *par) +void CollationRegressionTest::Test4087241(/* char* par */) { UErrorCode status = U_ZERO_ERROR; Locale da_DK("da", "DK"); @@ -638,7 +638,7 @@ void CollationRegressionTest::Test4087241(char *par) // // CollationKey takes ignorable strings into account when it shouldn't // -void CollationRegressionTest::Test4087243(char *par) +void CollationRegressionTest::Test4087243(/* char* par */) { RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone(); c->setStrength(Collator::TERTIARY); @@ -658,7 +658,7 @@ void CollationRegressionTest::Test4087243(char *par) // Mu/micro conflict // Micro symbol and greek lowercase letter Mu should sort identically // -void CollationRegressionTest::Test4092260(char *par) +void CollationRegressionTest::Test4092260(/* char* par */) { UErrorCode status = U_ZERO_ERROR; Locale el("el", ""); @@ -685,7 +685,7 @@ void CollationRegressionTest::Test4092260(char *par) // @bug 4095316 // -void CollationRegressionTest::Test4095316(char *par) +void CollationRegressionTest::Test4095316(/* char* par */) { UErrorCode status = U_ZERO_ERROR; Locale el_GR("el", "GR"); @@ -712,7 +712,7 @@ void CollationRegressionTest::Test4095316(char *par) // @bug 4101940 // -void CollationRegressionTest::Test4101940(char *par) +void CollationRegressionTest::Test4101940(/* char* par */) { UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *c = NULL; @@ -744,7 +744,7 @@ void CollationRegressionTest::Test4101940(char *par) // // Collator::compare not handling spaces properly // -void CollationRegressionTest::Test4103436(char *par) +void CollationRegressionTest::Test4103436(/* char* par */) { RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone(); c->setStrength(Collator::TERTIARY); @@ -764,7 +764,7 @@ void CollationRegressionTest::Test4103436(char *par) // // Collation not Unicode conformant with Hangul syllables // -void CollationRegressionTest::Test4114076(char *par) +void CollationRegressionTest::Test4114076(/* char* par */) { RuleBasedCollator *c = (RuleBasedCollator *) en_us->clone(); c->setStrength(Collator::TERTIARY); @@ -807,7 +807,7 @@ void CollationRegressionTest::Test4114076(char *par) // // Collator::getCollationKey was hanging on certain character sequences // -void CollationRegressionTest::Test4124632(char *par) +void CollationRegressionTest::Test4124632(/* char* par */) { UErrorCode status = U_ZERO_ERROR; Collator *coll = NULL; @@ -837,7 +837,7 @@ void CollationRegressionTest::Test4124632(char *par) // // sort order of french words with multiple accents has errors // -void CollationRegressionTest::Test4132736(char *par) +void CollationRegressionTest::Test4132736(/* char* par */) { UErrorCode status = U_ZERO_ERROR; @@ -866,7 +866,7 @@ void CollationRegressionTest::Test4132736(char *par) // // The sorting using java.text.CollationKey is not in the exact order // -void CollationRegressionTest::Test4133509(char *par) +void CollationRegressionTest::Test4133509(/* char* par */) { static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] = { @@ -882,7 +882,7 @@ void CollationRegressionTest::Test4133509(char *par) // // Collation with decomposition off doesn't work for Europe // -void CollationRegressionTest::Test4114077(char *par) +void CollationRegressionTest::Test4114077(/* char* par */) { // Ensure that we get the same results with decomposition off // as we do with it on.... @@ -918,7 +918,7 @@ void CollationRegressionTest::Test4114077(char *par) // // Support for Swedish gone in 1.1.6 (Can't create Swedish collator) // -void CollationRegressionTest::Test4141640(char *par) +void CollationRegressionTest::Test4141640(/* char* par */) { // // Rather than just creating a Swedish collator, we might as well @@ -954,7 +954,7 @@ void CollationRegressionTest::Test4141640(char *par) // getCollationKey throws exception for spanish text // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6 // -void CollationRegressionTest::Test4139572(char *par) +void CollationRegressionTest::Test4139572(/* char* par */) { // // Code pasted straight from the bug report @@ -1029,7 +1029,7 @@ CollationElementIterator *My4146160Collator::createCollationElementIterator(cons // // RuleBasedCollator doesn't use createCollationElementIterator internally // -void CollationRegressionTest::Test4146160(char *par) +void CollationRegressionTest::Test4146160(/* char* par */) { #if 0 // @@ -1167,7 +1167,7 @@ void CollationRegressionTest::assertEqual(CollationElementIterator &i1, Collatio while (c1 != CollationElementIterator::NULLORDER); } -void CollationRegressionTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) +void CollationRegressionTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /* par */) { if (exec) { @@ -1176,37 +1176,37 @@ void CollationRegressionTest::runIndexedTest(int32_t index, UBool exec, const ch switch (index) { - case 0: name = "Test4048446"; if (exec) Test4048446(par); break; - case 1: name = "Test4051866"; if (exec) Test4051866(par); break; - case 2: name = "Test4053636"; if (exec) Test4053636(par); break; - case 3: name = "Test4054238"; if (exec) Test4054238(par); break; - case 4: name = "Test4054734"; if (exec) Test4054734(par); break; - case 5: name = "Test4054736"; if (exec) Test4054736(par); break; - case 6: name = "Test4058613"; if (exec) Test4058613(par); break; - case 7: name = "Test4059820"; if (exec) Test4059820(par); break; - case 8: name = "Test4060154"; if (exec) Test4060154(par); break; - case 9: name = "Test4062418"; if (exec) Test4062418(par); break; - case 10: name = "Test4065540"; if (exec) Test4065540(par); break; - case 11: name = "Test4066189"; if (exec) Test4066189(par); break; - case 12: name = "Test4066696"; if (exec) Test4066696(par); break; - case 13: name = "Test4076676"; if (exec) Test4076676(par); break; - case 14: name = "Test4078588"; if (exec) Test4078588(par); break; - case 15: name = "Test4079231"; if (exec) Test4079231(par); break; - case 16: name = "Test4081866"; if (exec) Test4081866(par); break; - case 17: name = "Test4087241"; if (exec) Test4087241(par); break; - case 18: name = "Test4087243"; if (exec) Test4087243(par); break; - case 19: name = "Test4092260"; if (exec) Test4092260(par); break; - case 20: name = "Test4095316"; if (exec) Test4095316(par); break; - case 21: name = "Test4101940"; if (exec) Test4101940(par); break; - case 22: name = "Test4103436"; if (exec) Test4103436(par); break; - case 23: name = "Test4114076"; if (exec) Test4114076(par); break; - case 24: name = "Test4114077"; if (exec) Test4114077(par); break; - case 25: name = "Test4124632"; if (exec) Test4124632(par); break; - case 26: name = "Test4132736"; if (exec) Test4132736(par); break; - case 27: name = "Test4133509"; if (exec) Test4133509(par); break; - case 28: name = "Test4139572"; if (exec) Test4139572(par); break; - case 29: name = "Test4141640"; if (exec) Test4141640(par); break; - case 30: name = "Test4146160"; if (exec) Test4146160(par); break; + case 0: name = "Test4048446"; if (exec) Test4048446(/* par */); break; + case 1: name = "Test4051866"; if (exec) Test4051866(/* par */); break; + case 2: name = "Test4053636"; if (exec) Test4053636(/* par */); break; + case 3: name = "Test4054238"; if (exec) Test4054238(/* par */); break; + case 4: name = "Test4054734"; if (exec) Test4054734(/* par */); break; + case 5: name = "Test4054736"; if (exec) Test4054736(/* par */); break; + case 6: name = "Test4058613"; if (exec) Test4058613(/* par */); break; + case 7: name = "Test4059820"; if (exec) Test4059820(/* par */); break; + case 8: name = "Test4060154"; if (exec) Test4060154(/* par */); break; + case 9: name = "Test4062418"; if (exec) Test4062418(/* par */); break; + case 10: name = "Test4065540"; if (exec) Test4065540(/* par */); break; + case 11: name = "Test4066189"; if (exec) Test4066189(/* par */); break; + case 12: name = "Test4066696"; if (exec) Test4066696(/* par */); break; + case 13: name = "Test4076676"; if (exec) Test4076676(/* par */); break; + case 14: name = "Test4078588"; if (exec) Test4078588(/* par */); break; + case 15: name = "Test4079231"; if (exec) Test4079231(/* par */); break; + case 16: name = "Test4081866"; if (exec) Test4081866(/* par */); break; + case 17: name = "Test4087241"; if (exec) Test4087241(/* par */); break; + case 18: name = "Test4087243"; if (exec) Test4087243(/* par */); break; + case 19: name = "Test4092260"; if (exec) Test4092260(/* par */); break; + case 20: name = "Test4095316"; if (exec) Test4095316(/* par */); break; + case 21: name = "Test4101940"; if (exec) Test4101940(/* par */); break; + case 22: name = "Test4103436"; if (exec) Test4103436(/* par */); break; + case 23: name = "Test4114076"; if (exec) Test4114076(/* par */); break; + case 24: name = "Test4114077"; if (exec) Test4114077(/* par */); break; + case 25: name = "Test4124632"; if (exec) Test4124632(/* par */); break; + case 26: name = "Test4132736"; if (exec) Test4132736(/* par */); break; + case 27: name = "Test4133509"; if (exec) Test4133509(/* par */); break; + case 28: name = "Test4139572"; if (exec) Test4139572(/* par */); break; + case 29: name = "Test4141640"; if (exec) Test4141640(/* par */); break; + case 30: name = "Test4146160"; if (exec) Test4146160(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/regcoll.h b/icu4c/source/test/intltest/regcoll.h index bf1428f81cd..7290e39e88e 100644 --- a/icu4c/source/test/intltest/regcoll.h +++ b/icu4c/source/test/intltest/regcoll.h @@ -47,19 +47,19 @@ public: // // CollationElementIterator.reset() doesn't work // - void Test4048446(char *par); + void Test4048446(/* char* par */); // @bug 4051866 // // Collator -> rules -> Collator round-trip broken for expanding characters // - void Test4051866(char *par); + void Test4051866(/* char* par */); // @bug 4053636 // // Collator thinks "black-bird" == "black" // - void Test4053636(char *par); + void Test4053636(/* char* par */); // @bug 4054238 @@ -67,50 +67,50 @@ public: // CollationElementIterator will not work correctly if the associated // Collator object's mode is changed // - void Test4054238(char *par); + void Test4054238(/* char* par */); // @bug 4054734 // // Collator.IDENTICAL documented but not implemented // - void Test4054734(char *par); + void Test4054734(/* char* par */); // @bug 4054736 // // Full Decomposition mode not implemented // - void Test4054736(char *par); + void Test4054736(/* char* par */); // @bug 4058613 // // Collator.getInstance() causes an ArrayIndexOutofBoundsException for Korean // - void Test4058613(char *par); + void Test4058613(/* char* par */); // @bug 4059820 // // RuleBasedCollator.getRules does not return the exact pattern as input // for expanding character sequences // - void Test4059820(char *par); + void Test4059820(/* char* par */); // @bug 4060154 // // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I" // - void Test4060154(char *par); + void Test4060154(/* char* par */); // @bug 4062418 // // Secondary/Tertiary comparison incorrect in French Secondary // - void Test4062418(char *par); + void Test4062418(/* char* par */); // @bug 4065540 // // Collator.compare() method broken if either string contains spaces // - void Test4065540(char *par); + void Test4065540(/* char* par */); // @bug 4066189 // @@ -118,122 +118,122 @@ public: // correct result. For example, // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300. // - void Test4066189(char *par); + void Test4066189(/* char* par */); // @bug 4066696 // // French secondary collation checking at the end of compare iteration fails // - void Test4066696(char *par); + void Test4066696(/* char* par */); // @bug 4076676 // // Bad canonicalization of same-class combining characters // - void Test4076676(char *par); + void Test4076676(/* char* par */); // @bug 4078588 // // RuleBasedCollator breaks on "< a < bb" rule // - void Test4078588(char *par); + void Test4078588(/* char* par */); // @bug 4079231 // // RuleBasedCollator.equals(null) throws NullPointerException // - void Test4079231(char *par); + void Test4079231(/* char* par */); // @bug 4081866 // // Combining characters in different classes not reordered properly. // - void Test4081866(char *par); + void Test4081866(/* char* par */); // @bug 4087241 // // string comparison errors in Scandinavian collators // - void Test4087241(char *par); + void Test4087241(/* char* par */); // @bug 4087243 // // CollationKey takes ignorable strings into account when it shouldn't // - void Test4087243(char *par); + void Test4087243(/* char* par */); // @bug 4092260 // // Mu/micro conflict // Micro symbol and greek lowercase letter Mu should sort identically // - void Test4092260(char *par); + void Test4092260(/* char* par */); // @bug 4095316 // - void Test4095316(char *par); + void Test4095316(/* char* par */); // @bug 4101940 // - void Test4101940(char *par); + void Test4101940(/* char* par */); // @bug 4103436 // // Collator.compare not handling spaces properly // - void Test4103436(char *par); + void Test4103436(/* char* par */); // @bug 4114076 // // Collation not Unicode conformant with Hangul syllables // - void Test4114076(char *par); + void Test4114076(/* char* par */); // @bug 4114077 // // Collation with decomposition off doesn't work for Europe // - void Test4114077(char *par); + void Test4114077(/* char* par */); // @bug 4124632 // // Collator.getCollationKey was hanging on certain character sequences // - void Test4124632(char *par); + void Test4124632(/* char* par */); // @bug 4132736 // // sort order of french words with multiple accents has errors // - void Test4132736(char *par); + void Test4132736(/* char* par */); // @bug 4133509 // // The sorting using java.text.CollationKey is not in the exact order // - void Test4133509(char *par); + void Test4133509(/* char* par */); // @bug 4139572 // // getCollationKey throws exception for spanish text // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6 // - void Test4139572(char *par); + void Test4139572(/* char* par */); // @bug 4141640 // // Support for Swedish gone in 1.1.6 (Can't create Swedish collator) // - void Test4141640(char *par); + void Test4141640(/* char* par */); // @bug 4146160 // // RuleBasedCollator doesn't use getCollationElementIterator internally // - void Test4146160(char *par); + void Test4146160(/* char* par */); private: //------------------------------------------------------------------------ diff --git a/icu4c/source/test/intltest/restest.cpp b/icu4c/source/test/intltest/restest.cpp index 30370f6afdc..87b15ae6a36 100644 --- a/icu4c/source/test/intltest/restest.cpp +++ b/icu4c/source/test/intltest/restest.cpp @@ -174,7 +174,7 @@ ResourceBundleTest::~ResourceBundleTest() { } -void ResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void ResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite ResourceBundleTest: "); switch (index) { diff --git a/icu4c/source/test/intltest/restest.h b/icu4c/source/test/intltest/restest.h index eeab69853c5..0031b68d458 100644 --- a/icu4c/source/test/intltest/restest.h +++ b/icu4c/source/test/intltest/restest.h @@ -27,7 +27,7 @@ public: private: /** - * The assignment operator have no real implementation. + * The assignment operator has no real implementation. * It is provided to make the compiler happy. Do not call. */ ResourceBundleTest& operator=(const ResourceBundleTest&) { return *this; } diff --git a/icu4c/source/test/intltest/restsnew.cpp b/icu4c/source/test/intltest/restsnew.cpp index a8c50106d87..b547c2bb0c8 100644 --- a/icu4c/source/test/intltest/restsnew.cpp +++ b/icu4c/source/test/intltest/restsnew.cpp @@ -174,7 +174,7 @@ NewResourceBundleTest::~NewResourceBundleTest() { } -void NewResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void NewResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite ResourceBundleTest: "); switch (index) { diff --git a/icu4c/source/test/intltest/restsnew.h b/icu4c/source/test/intltest/restsnew.h index 620dad839c8..8125b4dfcd8 100644 --- a/icu4c/source/test/intltest/restsnew.h +++ b/icu4c/source/test/intltest/restsnew.h @@ -31,7 +31,7 @@ public: private: /** - * The assignment operator have no real implementation. + * The assignment operator has no real implementation. * It is provided to make the compiler happy. Do not call. */ NewResourceBundleTest& operator=(const NewResourceBundleTest&) { return *this; } diff --git a/icu4c/source/test/intltest/sdtfmtts.cpp b/icu4c/source/test/intltest/sdtfmtts.cpp index bbdfd2407ea..3e247d18ed8 100644 --- a/icu4c/source/test/intltest/sdtfmtts.cpp +++ b/icu4c/source/test/intltest/sdtfmtts.cpp @@ -15,7 +15,7 @@ // try to test the full functionality. It just calls each function in the class and // verifies that it works on a basic level. -void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite SimpleDateFormatAPI"); switch (index) { @@ -27,7 +27,7 @@ void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, con if(U_FAILURE(status)) { errln("ERROR: Could not set default locale, test may not give correct results"); } - testAPI(par); + testAPI(/*par*/); } break; @@ -38,7 +38,7 @@ void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, con /** * Test various generic API methods of SimpleDateFormat for API coverage. */ -void IntlTestSimpleDateFormatAPI::testAPI(char *par) +void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/sdtfmtts.h b/icu4c/source/test/intltest/sdtfmtts.h index 9114203618b..22dd31318f6 100644 --- a/icu4c/source/test/intltest/sdtfmtts.h +++ b/icu4c/source/test/intltest/sdtfmtts.h @@ -21,7 +21,7 @@ private: /** * Performs tests on many API functions, see detailed comments in source code **/ - void testAPI(char *par); + void testAPI(/* char* par */); }; #endif diff --git a/icu4c/source/test/intltest/strtest.cpp b/icu4c/source/test/intltest/strtest.cpp index 3510c6b7dca..7d8a7498668 100644 --- a/icu4c/source/test/intltest/strtest.cpp +++ b/icu4c/source/test/intltest/strtest.cpp @@ -46,7 +46,7 @@ void StringTest::TestCharsetFamily(void) { U_STRING_DECL(ustringVar, "aZ0 -", 5); -void StringTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char *par) { +void StringTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) { if(exec) { logln("TestSuite Character and String Test: "); } diff --git a/icu4c/source/test/intltest/tchcfmt.cpp b/icu4c/source/test/intltest/tchcfmt.cpp index 735466b9f09..9c0f3bbd4e7 100644 --- a/icu4c/source/test/intltest/tchcfmt.cpp +++ b/icu4c/source/test/intltest/tchcfmt.cpp @@ -591,8 +591,6 @@ TestChoiceFormat::TestGapNextDouble() it_out << "MSG: nextDouble & previousDouble tested." << endl; } -void foo (double* bar) {} - /** * test a value for TestGapNextDouble **/ @@ -617,7 +615,6 @@ TestChoiceFormat::testValue( double val ) double middle; double *middlePtr = &middle; *middlePtr = (val + valnext) / 2.0; - foo(middlePtr); if ((*middlePtr != val) && (*middlePtr != valnext)) { errln( (UnicodeString) "*** TestChoiceFormat::testValue #3 WARNING: There seems to be a gap for:" + val ); @@ -625,7 +622,6 @@ TestChoiceFormat::testValue( double val ) } *middlePtr = (val + valprev) / 2.0; - foo(middlePtr); if ((*middlePtr != val) && (*middlePtr != valprev)) { errln( (UnicodeString) @@ -635,7 +631,7 @@ TestChoiceFormat::testValue( double val ) } -void TestChoiceFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void TestChoiceFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { switch (index) { case 0: name = "TestSimpleExample"; diff --git a/icu4c/source/test/intltest/tfsmalls.cpp b/icu4c/source/test/intltest/tfsmalls.cpp index 368ee3c7e72..ff42f23d090 100644 --- a/icu4c/source/test/intltest/tfsmalls.cpp +++ b/icu4c/source/test/intltest/tfsmalls.cpp @@ -19,12 +19,12 @@ #include "unicode/fmtable.h" -static UBool chkstatus( UErrorCode &status, char* msg = NULL ) +/*static UBool chkstatus( UErrorCode &status, char* msg = NULL ) { UBool ok = (status == U_ZERO_ERROR); if (!ok) it_errln( msg ); return ok; -} +}*/ void test_ParsePosition( void ) { @@ -292,7 +292,7 @@ void test_Formattable( void ) } -void TestFormatSmallClasses::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void TestFormatSmallClasses::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { switch (index) { case 0: name = "pp"; diff --git a/icu4c/source/test/intltest/thcoll.cpp b/icu4c/source/test/intltest/thcoll.cpp index ab6cd86fafd..9c8df728c08 100644 --- a/icu4c/source/test/intltest/thcoll.cpp +++ b/icu4c/source/test/intltest/thcoll.cpp @@ -54,7 +54,7 @@ CollationThaiTest::~CollationThaiTest() { } void CollationThaiTest::runIndexedTest(int32_t index, UBool exec, const char* &name, - char* par) { + char* /*par*/) { switch (index) { CASE(0,TestDictionary) CASE(1,TestCornerCases) diff --git a/icu4c/source/test/intltest/tmsgfmt.cpp b/icu4c/source/test/intltest/tmsgfmt.cpp index d84b78e45a9..5f1cdb548e1 100644 --- a/icu4c/source/test/intltest/tmsgfmt.cpp +++ b/icu4c/source/test/intltest/tmsgfmt.cpp @@ -339,7 +339,7 @@ void TestMessageFormat::sample() } -void TestMessageFormat::testStaticFormat(char* parm) +void TestMessageFormat::testStaticFormat(/* char* par */) { logln("running TestMessageFormat::testStaticFormat"); @@ -375,7 +375,7 @@ void TestMessageFormat::testStaticFormat(char* parm) } -void TestMessageFormat::testSimpleFormat(char* parm) +void TestMessageFormat::testSimpleFormat(/* char* par */) { logln("running TestMessageFormat::testSimpleFormat"); @@ -413,7 +413,7 @@ void TestMessageFormat::testSimpleFormat(char* parm) delete form; } -void TestMessageFormat::testMsgFormatChoice(char* parm) +void TestMessageFormat::testMsgFormatChoice(/* char* par */) { logln("running TestMessageFormat::testMsgFormatChoice"); @@ -1040,7 +1040,7 @@ static void testCopyConstructor2() } -void TestMessageFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* parm ) +void TestMessageFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite MessageFormat"); @@ -1049,9 +1049,9 @@ void TestMessageFormat::runIndexedTest( int32_t index, UBool exec, const char* & case 1: name = "testBug2"; if (exec) testBug2(); break; case 2: name = "sample"; if (exec) sample(); break; case 3: name = "PatternTest"; if (exec) PatternTest(); break; - case 4: name = "testStaticFormat"; if (exec) testStaticFormat(parm); break; - case 5: name = "testSimpleFormat"; if (exec) testSimpleFormat(parm); break; - case 6: name = "testMsgFormatChoice"; if (exec) testMsgFormatChoice(parm); break; + case 4: name = "testStaticFormat"; if (exec) testStaticFormat(/* par */); break; + case 5: name = "testSimpleFormat"; if (exec) testSimpleFormat(/* par */); break; + case 6: name = "testMsgFormatChoice"; if (exec) testMsgFormatChoice(/* par */); break; case 7: name = "testCopyConstructor"; if (exec) testCopyConstructor(); break; case 8: name = "testAssignment"; if (exec) testAssignment(); break; diff --git a/icu4c/source/test/intltest/tmsgfmt.h b/icu4c/source/test/intltest/tmsgfmt.h index 129cfa13865..cf87c9a6699 100644 --- a/icu4c/source/test/intltest/tmsgfmt.h +++ b/icu4c/source/test/intltest/tmsgfmt.h @@ -45,15 +45,15 @@ public: /** * tests the static MessageFormat::format method **/ - void testStaticFormat(char* parm); + void testStaticFormat(/* char* par */); /** * tests MesageFormat functionality with a simple format **/ - void testSimpleFormat(char* parm); + void testSimpleFormat(/* char* par */); /** * tests MesageFormat functionality with a format including a ChoiceFormat **/ - void testMsgFormatChoice(char* parm); + void testMsgFormatChoice(/* char* par */); // /** diff --git a/icu4c/source/test/intltest/transapi.cpp b/icu4c/source/test/intltest/transapi.cpp index e399261bba7..1c698decd87 100644 --- a/icu4c/source/test/intltest/transapi.cpp +++ b/icu4c/source/test/intltest/transapi.cpp @@ -36,7 +36,7 @@ int32_t getInt(UnicodeString str) // runIndexedTest //--------------------------------------------- -void TransliteratorAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void TransliteratorAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite Transliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/transrt.cpp b/icu4c/source/test/intltest/transrt.cpp index 8b564f48048..f063804f4f3 100644 --- a/icu4c/source/test/intltest/transrt.cpp +++ b/icu4c/source/test/intltest/transrt.cpp @@ -25,7 +25,7 @@ void TransliteratorRoundTripTest::runIndexedTest(int32_t index, UBool exec, - const char* &name, char* par) { + const char* &name, char* /*par*/) { switch (index) { CASE(0,TestHiragana); CASE(1,TestKatakana); diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp index c5332f2a793..764f8da3e24 100644 --- a/icu4c/source/test/intltest/transtst.cpp +++ b/icu4c/source/test/intltest/transtst.cpp @@ -38,7 +38,7 @@ enum { void TransliteratorTest::runIndexedTest(int32_t index, UBool exec, - const char* &name, char* par) { + const char* &name, char* /*par*/) { switch (index) { CASE(0,TestInstantiation); CASE(1,TestSimpleRules); diff --git a/icu4c/source/test/intltest/trcoll.cpp b/icu4c/source/test/intltest/trcoll.cpp index b15aa85bbb9..42cb3b5f787 100644 --- a/icu4c/source/test/intltest/trcoll.cpp +++ b/icu4c/source/test/intltest/trcoll.cpp @@ -93,7 +93,7 @@ void CollationTurkishTest::doTest( UnicodeString source, UnicodeString target, C reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, result ); } -void CollationTurkishTest::TestTertiary( char* par ) +void CollationTurkishTest::TestTertiary(/* char* par */) { int32_t i = 0; myCollation->setStrength(Collator::TERTIARY); @@ -101,7 +101,7 @@ void CollationTurkishTest::TestTertiary( char* par ) doTest(testSourceCases[i], testTargetCases[i], results[i]); } } -void CollationTurkishTest::TestPrimary( char* par ) +void CollationTurkishTest::TestPrimary(/* char* par */) { int32_t i; myCollation->setStrength(Collator::PRIMARY); @@ -110,12 +110,12 @@ void CollationTurkishTest::TestPrimary( char* par ) } } -void CollationTurkishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void CollationTurkishTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite CollationTurkishTest: "); switch (index) { - case 0: name = "TestPrimary"; if (exec) TestPrimary( par ); break; - case 1: name = "TestTertiary"; if (exec) TestTertiary( par ); break; + case 0: name = "TestPrimary"; if (exec) TestPrimary(/* par */); break; + case 1: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; default: name = ""; break; } } diff --git a/icu4c/source/test/intltest/trcoll.h b/icu4c/source/test/intltest/trcoll.h index 47a8b3c702b..d5eb766abf2 100644 --- a/icu4c/source/test/intltest/trcoll.h +++ b/icu4c/source/test/intltest/trcoll.h @@ -37,10 +37,10 @@ public: void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result); // perform tests for turkish locale with strength PRIMARY - void TestPrimary( char* par ); + void TestPrimary(/* char* par */); // perform tests for turkish locale with strength TERTIARY - void TestTertiary( char* par ); + void TestTertiary(/* char* par */); private: // static constants diff --git a/icu4c/source/test/intltest/tsdate.cpp b/icu4c/source/test/intltest/tsdate.cpp index cd7770ff87f..deac9e0a931 100644 --- a/icu4c/source/test/intltest/tsdate.cpp +++ b/icu4c/source/test/intltest/tsdate.cpp @@ -19,7 +19,7 @@ const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate * DateFormat. */ // par is ignored throughout this file -void IntlTestDateFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestDateFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite DateFormat"); switch (index) { @@ -29,27 +29,27 @@ void IntlTestDateFormat::runIndexedTest( int32_t index, UBool exec, const char* fFormat = DateFormat::createInstance(); fTestName = "createInstance"; fLimit = 3; - testFormat( par ); + testFormat(/* par */); } break; case 1: name = "Default Locale"; if (exec) { logln(name); - testLocale(par, Locale::getDefault(), "Default Locale"); + testLocale(/*par, */Locale::getDefault(), "Default Locale"); } break; case 2: name = "Determine Available Locales"; if (exec) { logln(name); - testAvailableLocales(par); + testAvailableLocales(/* par */); } break; case 3: name = "Test Available Locales"; if (exec) { logln(name); - monsterTest(par); + monsterTest(/*par*/); } break; @@ -58,7 +58,7 @@ void IntlTestDateFormat::runIndexedTest( int32_t index, UBool exec, const char* } void -IntlTestDateFormat::testLocale(char* par, const Locale& locale, const UnicodeString& localeName) +IntlTestDateFormat::testLocale(/*char* par, */const Locale& locale, const UnicodeString& localeName) { DateFormat::EStyle timeStyle, dateStyle; @@ -73,7 +73,7 @@ IntlTestDateFormat::testLocale(char* par, const Locale& locale, const UnicodeStr { fTestName = (UnicodeString) "Time test " + (int32_t) timeStyle + " (" + localeName + ")"; fFormat = DateFormat::createTimeInstance(timeStyle, locale); - testFormat(par); + testFormat(/* par */); } fLimit = 2; @@ -84,7 +84,7 @@ IntlTestDateFormat::testLocale(char* par, const Locale& locale, const UnicodeStr { fTestName = (UnicodeString) "Date test " + (int32_t) dateStyle + " (" + localeName + ")"; fFormat = DateFormat::createDateInstance(dateStyle, locale); - testFormat(par); + testFormat(/* par */); } for(dateStyle = (DateFormat::EStyle)0; @@ -97,12 +97,12 @@ IntlTestDateFormat::testLocale(char* par, const Locale& locale, const UnicodeStr { fTestName = (UnicodeString) "DateTime test " + (int32_t) dateStyle + "/" + (int32_t) timeStyle + " (" + localeName + ")"; fFormat = DateFormat::createDateTimeInstance(dateStyle, timeStyle, locale); - testFormat(par); + testFormat(/* par */); } } } -void IntlTestDateFormat::testFormat(char *par) +void IntlTestDateFormat::testFormat(/* char* par */) { if (fFormat == 0) { @@ -224,7 +224,7 @@ double IntlTestDateFormat::randDouble() return d; } -void IntlTestDateFormat::testAvailableLocales(char *par) +void IntlTestDateFormat::testAvailableLocales(/* char* par */) { int32_t count = 0; const Locale* locales = DateFormat::getAvailableLocales(count); @@ -243,7 +243,7 @@ void IntlTestDateFormat::testAvailableLocales(char *par) else errln((UnicodeString)"********** FAIL: Zero available locales or null array pointer"); } -void IntlTestDateFormat::monsterTest(char *par) +void IntlTestDateFormat::monsterTest(/*char *par*/) { int32_t count; const Locale* locales = DateFormat::getAvailableLocales(count); @@ -257,7 +257,7 @@ void IntlTestDateFormat::monsterTest(char *par) { UnicodeString name = UnicodeString(locales[i].getName(), ""); logln((UnicodeString)"Testing " + name + "..."); - testLocale(par, locales[i], name); + testLocale(/*par, */locales[i], name); } } } diff --git a/icu4c/source/test/intltest/tsdate.h b/icu4c/source/test/intltest/tsdate.h index eb40569dd5a..ac09d003029 100644 --- a/icu4c/source/test/intltest/tsdate.h +++ b/icu4c/source/test/intltest/tsdate.h @@ -25,16 +25,16 @@ private: /** * test DateFormat::getAvailableLocales **/ - void testAvailableLocales(char *par); + void testAvailableLocales(/* char* par */); /** * call testLocale for all locales **/ - void monsterTest(char *par); + void monsterTest(/* char *par */); /** * call tryDate with variations, called by testLocale **/ - void testFormat(char *par); + void testFormat(/* char* par */); /** * perform tests using date and fFormat, called in many variations **/ @@ -42,7 +42,7 @@ private: /** * call testFormat for different DateFormat::EStyle's, etc **/ - void testLocale(char *par, const Locale&, const UnicodeString&); + void testLocale(/*char *par, */const Locale&, const UnicodeString&); /** * return a random number **/ diff --git a/icu4c/source/test/intltest/tsdcfmsy.cpp b/icu4c/source/test/intltest/tsdcfmsy.cpp index d9da0f5003b..c7ad0312746 100644 --- a/icu4c/source/test/intltest/tsdcfmsy.cpp +++ b/icu4c/source/test/intltest/tsdcfmsy.cpp @@ -10,14 +10,14 @@ #include "unicode/unum.h" #include "tsdcfmsy.h" -void IntlTestDecimalFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestDecimalFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite DecimalFormatSymbols"); switch (index) { case 0: name = "DecimalFormatSymbols test"; if (exec) { logln("DecimalFormatSymbols test---"); logln(""); - testSymbols(par); + testSymbols(/*par*/); } break; @@ -28,7 +28,7 @@ void IntlTestDecimalFormatSymbols::runIndexedTest( int32_t index, UBool exec, co /** * Test the API of DecimalFormatSymbols; primarily a simple get/set set. */ -void IntlTestDecimalFormatSymbols::testSymbols(char *par) +void IntlTestDecimalFormatSymbols::testSymbols(/* char *par */) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/tsdcfmsy.h b/icu4c/source/test/intltest/tsdcfmsy.h index 9f103859e8d..ec018d34f78 100644 --- a/icu4c/source/test/intltest/tsdcfmsy.h +++ b/icu4c/source/test/intltest/tsdcfmsy.h @@ -21,7 +21,7 @@ private: /** * Test the API of DecimalFormatSymbols; primarily a simple get/set set. */ - void testSymbols(char *par); + void testSymbols(/*char *par*/); /** helper functions**/ void Verify(double value, const UnicodeString& pattern, DecimalFormatSymbols sym, const UnicodeString& expected); diff --git a/icu4c/source/test/intltest/tsdtfmsy.cpp b/icu4c/source/test/intltest/tsdtfmsy.cpp index c948d26ca56..cea3e7e279a 100644 --- a/icu4c/source/test/intltest/tsdtfmsy.cpp +++ b/icu4c/source/test/intltest/tsdtfmsy.cpp @@ -10,14 +10,14 @@ #include "unicode/dtfmtsym.h" -void IntlTestDateFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestDateFormatSymbols::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite DateFormatSymbols"); switch (index) { case 0: name = "DateFormatSymbols test"; if (exec) { logln("DateFormatSymbols test---"); logln(""); - testSymbols(par); + testSymbols(/*par*/); } break; @@ -59,7 +59,7 @@ void IntlTestDateFormatSymbols::TestGetMonths() /** * Test the API of DateFormatSymbols; primarily a simple get/set set. */ -void IntlTestDateFormatSymbols::testSymbols(char *par) +void IntlTestDateFormatSymbols::testSymbols(/* char *par */) { UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/intltest/tsdtfmsy.h b/icu4c/source/test/intltest/tsdtfmsy.h index f9c00eaee2b..61c3ecd4eda 100644 --- a/icu4c/source/test/intltest/tsdtfmsy.h +++ b/icu4c/source/test/intltest/tsdtfmsy.h @@ -21,7 +21,7 @@ private: /** * Test the API of DateFormatSymbols; primarily a simple get/set set. */ - void testSymbols(char *par); + void testSymbols(/* char *par */); /** * Test getMonths. */ diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index 9ad960acb33..0131a11aea8 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -266,7 +266,7 @@ void SimpleThread::sleep(int32_t millis) /* now begins the real test. */ void MultithreadTest::runIndexedTest( int32_t index, UBool exec, - const char* &name, char* par ) { + const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite MultithreadTest: "); switch (index) { case 0: name = "TestThreads"; if (exec) TestThreads(); break; @@ -392,6 +392,12 @@ public: TestMutexThread1 & fOtherThread; UBool fDone, fErr; int32_t fElapsed; +private: + /** + * The assignment operator has no real implementation. + * It is provided to make the compiler happy. Do not call. + */ + TestMutexThread2& operator=(const TestMutexThread2&) { return *this; } }; void MultithreadTest::TestMutex() diff --git a/icu4c/source/test/intltest/tsmutex.cpp b/icu4c/source/test/intltest/tsmutex.cpp index 6501069bb36..55516ee31fb 100644 --- a/icu4c/source/test/intltest/tsmutex.cpp +++ b/icu4c/source/test/intltest/tsmutex.cpp @@ -54,7 +54,7 @@ MutexTest::~MutexTest() { } void MutexTest::runIndexedTest( int32_t index, UBool exec, - const char* &name, char* par ) { + const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite MutexTest: "); switch (index) { case 0: name = "TestMutex"; if (exec) TestMutex(); break; diff --git a/icu4c/source/test/intltest/tsnmfmt.cpp b/icu4c/source/test/intltest/tsnmfmt.cpp index d7f2ae5be0b..c4341d16ffc 100644 --- a/icu4c/source/test/intltest/tsnmfmt.cpp +++ b/icu4c/source/test/intltest/tsnmfmt.cpp @@ -17,7 +17,7 @@ * This test does round-trip testing (format -> parse -> format -> parse -> etc.) of * NumberFormat. */ -void IntlTestNumberFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void IntlTestNumberFormat::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite NumberFormat"); @@ -28,25 +28,25 @@ void IntlTestNumberFormat::runIndexedTest( int32_t index, UBool exec, const char logln(name); fStatus = U_ZERO_ERROR; fFormat = NumberFormat::createInstance(fStatus); - testFormat(par); + testFormat(/*par*/); } break; case 1: name = "Default Locale"; - if (exec) testLocale(par, Locale::getDefault(), "Default Locale"); + if (exec) testLocale(/*par, */Locale::getDefault(), "Default Locale"); break; case 2: name = "Determine Available Locales"; if (exec) { logln(name); - testAvailableLocales(par); + testAvailableLocales(/*par*/); } break; case 3: name = "Test Available Locales"; if (exec) { logln(name); - monsterTest(par); + monsterTest(/*par*/); } break; @@ -55,7 +55,7 @@ void IntlTestNumberFormat::runIndexedTest( int32_t index, UBool exec, const char } void -IntlTestNumberFormat::testLocale(char* par, const Locale& locale, const UnicodeString& localeName) +IntlTestNumberFormat::testLocale(/* char* par, */const Locale& locale, const UnicodeString& localeName) { const char* name; @@ -63,28 +63,29 @@ IntlTestNumberFormat::testLocale(char* par, const Locale& locale, const UnicodeS logln((UnicodeString)name + " (" + localeName + ")"); fStatus = U_ZERO_ERROR; fFormat = NumberFormat::createInstance(locale, fStatus); - testFormat(par); + testFormat(/* par */); name = "Currency test"; logln((UnicodeString)name + " (" + localeName + ")"); fStatus = U_ZERO_ERROR; fFormat = NumberFormat::createCurrencyInstance(locale, fStatus); - testFormat(par); + testFormat(/* par */); name = "Percent test"; logln((UnicodeString)name + " (" + localeName + ")"); fStatus = U_ZERO_ERROR; fFormat = NumberFormat::createPercentInstance(locale, fStatus); - testFormat(par); + testFormat(/* par */); } void -IntlTestNumberFormat::testFormat(char *par) +IntlTestNumberFormat::testFormat(/* char* par */) { if (U_FAILURE(fStatus)) { errln((UnicodeString)"********** FAIL: createXxxInstance failed."); - if (fFormat != 0) errln("********** FAIL: Non-null format returned by createXxxInstance upon failure."); + if (fFormat != 0) + errln("********** FAIL: Non-null format returned by createXxxInstance upon failure."); delete fFormat; fFormat = 0; return; @@ -336,7 +337,7 @@ IntlTestNumberFormat::tryIt(int32_t aNumber) } } -void IntlTestNumberFormat::testAvailableLocales(char *par) +void IntlTestNumberFormat::testAvailableLocales(/* char* par */) { int32_t count = 0; const Locale* locales = NumberFormat::getAvailableLocales(count); @@ -355,7 +356,7 @@ void IntlTestNumberFormat::testAvailableLocales(char *par) else errln((UnicodeString)"********** FAIL: Zero available locales or null array pointer"); } -void IntlTestNumberFormat::monsterTest(char *par) +void IntlTestNumberFormat::monsterTest(/* char* par */) { const char *SEP = "============================================================\n"; int32_t count; @@ -370,7 +371,7 @@ void IntlTestNumberFormat::monsterTest(char *par) { UnicodeString name(locales[i].getName(), ""); logln(SEP); - testLocale(par, locales[i], name); + testLocale(/* par, */locales[i], name); } } diff --git a/icu4c/source/test/intltest/tsnmfmt.h b/icu4c/source/test/intltest/tsnmfmt.h index fdbfb3c4d19..fac2010492d 100644 --- a/icu4c/source/test/intltest/tsnmfmt.h +++ b/icu4c/source/test/intltest/tsnmfmt.h @@ -27,7 +27,7 @@ private: /** * call tryIt with many variations, called by testLocale **/ - void testFormat(char *par); + void testFormat(/* char* par */); /** * perform tests using aNumber and fFormat, called in many variations **/ @@ -39,15 +39,15 @@ private: /** * test NumberFormat::getAvailableLocales **/ - void testAvailableLocales(char *par); + void testAvailableLocales(/* char* par */); /** * call testLocale for all locales **/ - void monsterTest(char *par); + void monsterTest(/* char *par */); /** * call testFormat for currency, percent and plain number instances **/ - void testLocale(char *par, const Locale& locale, const UnicodeString& localeName); + void testLocale(/* char *par, */const Locale& locale, const UnicodeString& localeName); NumberFormat* fFormat; UErrorCode fStatus; diff --git a/icu4c/source/test/intltest/tsputil.cpp b/icu4c/source/test/intltest/tsputil.cpp index 4b8f1a7ce32..99a83264c1d 100644 --- a/icu4c/source/test/intltest/tsputil.cpp +++ b/icu4c/source/test/intltest/tsputil.cpp @@ -11,7 +11,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { //if (exec) logln("TestSuite PUtilTest: "); switch (index) { @@ -26,11 +26,11 @@ PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* p void PUtilTest::testIEEEremainder() { - double pinf = uprv_getInfinity(); - double ninf = -uprv_getInfinity(); - double nan = uprv_getNaN(); - double pzero = 0.0; - double nzero = 0.0; + double pinf = uprv_getInfinity(); + double ninf = -uprv_getInfinity(); + double nan = uprv_getNaN(); + double pzero = 0.0; + double nzero = 0.0; nzero *= -1; diff --git a/icu4c/source/test/intltest/tstnorm.cpp b/icu4c/source/test/intltest/tstnorm.cpp index a23173b845c..bd98136a6a0 100644 --- a/icu4c/source/test/intltest/tstnorm.cpp +++ b/icu4c/source/test/intltest/tstnorm.cpp @@ -21,7 +21,7 @@ static UErrorCode status = U_ZERO_ERROR; void BasicNormalizerTest::runIndexedTest(int32_t index, UBool exec, - const char* &name, char* par) { + const char* &name, char* /*par*/) { switch (index) { CASE(0,TestDecomp); CASE(1,TestCompatDecomp); diff --git a/icu4c/source/test/intltest/tzbdtest.cpp b/icu4c/source/test/intltest/tzbdtest.cpp index 4d0a7e00a8d..acfc884b7f2 100644 --- a/icu4c/source/test/intltest/tzbdtest.cpp +++ b/icu4c/source/test/intltest/tzbdtest.cpp @@ -10,7 +10,7 @@ #include "unicode/simpletz.h" #include "unicode/gregocal.h" -void TimeZoneBoundaryTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void TimeZoneBoundaryTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite TestTimeZoneBoundary"); switch (index) { diff --git a/icu4c/source/test/intltest/tzregts.cpp b/icu4c/source/test/intltest/tzregts.cpp index 6f8b944e0e5..f90b6c29c40 100644 --- a/icu4c/source/test/intltest/tzregts.cpp +++ b/icu4c/source/test/intltest/tzregts.cpp @@ -20,7 +20,7 @@ #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break; void -TimeZoneRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +TimeZoneRegressionTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { // if (exec) logln((UnicodeString)"TestSuite NumberFormatRegressionTest"); switch (index) { diff --git a/icu4c/source/test/intltest/tztest.cpp b/icu4c/source/test/intltest/tztest.cpp index 000d344f45d..606105bcaf1 100644 --- a/icu4c/source/test/intltest/tztest.cpp +++ b/icu4c/source/test/intltest/tztest.cpp @@ -23,7 +23,7 @@ // class TimeZoneTest // ***************************************************************************** -void TimeZoneTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void TimeZoneTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite TestTimeZone"); switch (index) { diff --git a/icu4c/source/test/intltest/ucdtest.cpp b/icu4c/source/test/intltest/ucdtest.cpp index c70b8a29616..3bf8edea310 100644 --- a/icu4c/source/test/intltest/ucdtest.cpp +++ b/icu4c/source/test/intltest/ucdtest.cpp @@ -19,7 +19,7 @@ UnicodeTest::~UnicodeTest() { } -void UnicodeTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void UnicodeTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite UnicodeTest: "); switch (index) { diff --git a/icu4c/source/test/intltest/ufltlgts.cpp b/icu4c/source/test/intltest/ufltlgts.cpp index 30405c704c5..87a6c0891b7 100644 --- a/icu4c/source/test/intltest/ufltlgts.cpp +++ b/icu4c/source/test/intltest/ufltlgts.cpp @@ -24,7 +24,7 @@ // runIndexedTest //--------------------------------------------- -void UnicodeFilterLogicTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void UnicodeFilterLogicTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite UnicodeFilterLogic API "); switch (index) { diff --git a/icu4c/source/test/intltest/unhxtrts.cpp b/icu4c/source/test/intltest/unhxtrts.cpp index a403ff1d90f..ad639e0d058 100644 --- a/icu4c/source/test/intltest/unhxtrts.cpp +++ b/icu4c/source/test/intltest/unhxtrts.cpp @@ -34,7 +34,7 @@ static int32_t getInt(UnicodeString str) // runIndexedTest //--------------------------------------------- -void UniToHexTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void UniToHexTransliteratorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln((UnicodeString)"TestSuite UnicodeToHexadecimal Transliterator API "); switch (index) { diff --git a/icu4c/source/test/intltest/usettest.cpp b/icu4c/source/test/intltest/usettest.cpp index 37ee9935c37..a1102382e5d 100644 --- a/icu4c/source/test/intltest/usettest.cpp +++ b/icu4c/source/test/intltest/usettest.cpp @@ -29,7 +29,7 @@ UnicodeString operator+(const UnicodeString& left, const UnicodeSet& set) { void UnicodeSetTest::runIndexedTest(int32_t index, UBool exec, - const char* &name, char* par) { + const char* &name, char* /*par*/) { // if (exec) logln((UnicodeString)"TestSuite UnicodeSetTest"); switch (index) { CASE(0,TestPatterns); diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp index f08fee72a4e..73861c8bb41 100644 --- a/icu4c/source/test/intltest/ustrtest.cpp +++ b/icu4c/source/test/intltest/ustrtest.cpp @@ -18,7 +18,7 @@ UnicodeStringTest::~UnicodeStringTest() { } -void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) +void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) { if (exec) logln("TestSuite LocaleTest: "); switch (index) {