ICU-717 Fixed a compiler error.

UnicodeConverterCPP -> UnicodeConverter because UnicodeConverterCPP is a #define.
Fixed a typo in the error message.

X-SVN-Rev: 3289
This commit is contained in:
George Rhoten 2000-12-20 04:42:54 +00:00
parent 14787165b6
commit cc4aaf53d9

View File

@ -592,12 +592,10 @@ void ConvertTest::TestConvert()
fclose(ucs_file_in);
delete myConverter;
//#ifndef WIN32
delete uniString;
delete uniString2;
delete uniString3;
delete testUnistr;
//#endif
}
/******* testing for Bug 778 *******************/
@ -607,21 +605,21 @@ void ConvertTest::TestConvert()
UBool passed = TRUE;
UnicodeString unicode_string((UChar)0x592a);
UErrorCode error = U_ZERO_ERROR;
UnicodeConverterCPP cnv( "iso-2022-jp-2", error );
UnicodeConverter cnv( "iso-2022-jp-2", error );
if( U_FAILURE(err) ) {
errln(UnicodeString("Error Creating iso-2022-jp-2 converter. Reason: ") + myErrorName(error));
}
char dest[256];
long dest_bytes_used = 256;
int32_t dest_bytes_used = 256;
cnv.fromUnicodeString( dest, dest_bytes_used, unicode_string, error );
if( U_FAILURE(err) ) {
errln( UnicodeString("Error converting to iso-2022-jp-2 stream:" )+ myErrorName(error) );
}
char* expected ="\x1b\x24\x42\x42\x40";
const char* expected ="\x1b\x24\x42\x42\x40";
char* got = &dest[0];
while(*expected!='\0'){
if(*got!=*expected){
errln(UnicodeString("Error while testing jitterbug 778 exprected: ") + (char) *expected + " got: " + (char) *got);
errln(UnicodeString("Error while testing jitterbug 778. Expected: ") + (char) *expected + " got: " + (char) *got);
passed =FALSE;
}
got++;