mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-535 fixed some compiler warnings
X-SVN-Rev: 2339
This commit is contained in:
parent
ef77fc7e62
commit
a15b66a53d
93 changed files with 670 additions and 644 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;x<ii;x++) rest = (int16_t)(((unsigned char)rest << 8) + (unsigned char)myptr[x]);
|
||||
if (rest==CodePagesSubstitutionChars[codepage_index]) logln("Substitution character ok");
|
||||
else errln("Substitution character failed.");
|
||||
|
||||
|
||||
|
||||
logln("\n---Testing UnicodeConverter::setSubstitutionChars RoundTrip Test ...");
|
||||
myConverter->setSubstitutionChars(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;x<ii;x++) rest = (int16_t)(((unsigned char)rest << 8) + (unsigned char)myptr[x]);
|
||||
if (rest==CodePagesSubstitutionChars[codepage_index])
|
||||
logln("Substitution character ok");
|
||||
else
|
||||
errln("Substitution character failed.");
|
||||
|
||||
|
||||
|
||||
logln("\n---Testing UnicodeConverter::setSubstitutionChars RoundTrip Test ...");
|
||||
myConverter->setSubstitutionChars(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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
//------------------------------------------------------------------------
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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: ");
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */);
|
||||
|
||||
//
|
||||
/**
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
**/
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue