ICU-1978 add info methods to intltest
X-SVN-Rev: 9098
This commit is contained in:
parent
accd23770e
commit
d452fce04f
@ -453,6 +453,24 @@ void it_logln( void )
|
||||
IntlTest::gTest->logln();
|
||||
}
|
||||
|
||||
void it_info( UnicodeString message )
|
||||
{
|
||||
if (IntlTest::gTest)
|
||||
IntlTest::gTest->info( message );
|
||||
}
|
||||
|
||||
void it_infoln( UnicodeString message )
|
||||
{
|
||||
if (IntlTest::gTest)
|
||||
IntlTest::gTest->infoln( message );
|
||||
}
|
||||
|
||||
void it_infoln( void )
|
||||
{
|
||||
if (IntlTest::gTest)
|
||||
IntlTest::gTest->infoln();
|
||||
}
|
||||
|
||||
void it_err()
|
||||
{
|
||||
if (IntlTest::gTest)
|
||||
@ -715,6 +733,28 @@ void IntlTest::logln( void )
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unconditionally adds given string to the log.
|
||||
*/
|
||||
void IntlTest::info( const UnicodeString &message )
|
||||
{
|
||||
LL_message( message, FALSE );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unconditionally adds given string to the log. Adds a new line to
|
||||
* the given message.
|
||||
*/
|
||||
void IntlTest::infoln( const UnicodeString &message )
|
||||
{
|
||||
LL_message( message, TRUE );
|
||||
}
|
||||
|
||||
void IntlTest::infoln( void )
|
||||
{
|
||||
LL_message( "", TRUE );
|
||||
}
|
||||
|
||||
int32_t IntlTest::IncErrorCount( void )
|
||||
{
|
||||
errorCount++;
|
||||
@ -767,6 +807,31 @@ void IntlTest::logln(const char *fmt, ...)
|
||||
}
|
||||
}
|
||||
|
||||
/* convenience functions that include sprintf formatting */
|
||||
void IntlTest::info(const char *fmt, ...)
|
||||
{
|
||||
char buffer[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
/* sprintf it just to make sure that the information is valid */
|
||||
vsprintf(buffer, fmt, ap);
|
||||
va_end(ap);
|
||||
info(UnicodeString(buffer, ""));
|
||||
}
|
||||
|
||||
void IntlTest::infoln(const char *fmt, ...)
|
||||
{
|
||||
char buffer[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
/* sprintf it just to make sure that the information is valid */
|
||||
vsprintf(buffer, fmt, ap);
|
||||
va_end(ap);
|
||||
infoln(UnicodeString(buffer, ""));
|
||||
}
|
||||
|
||||
void IntlTest::err(const char *fmt, ...)
|
||||
{
|
||||
char buffer[512];
|
||||
|
@ -90,6 +90,12 @@ public:
|
||||
|
||||
virtual void logln( void );
|
||||
|
||||
virtual void info( const UnicodeString &message );
|
||||
|
||||
virtual void infoln( const UnicodeString &message );
|
||||
|
||||
virtual void infoln( void );
|
||||
|
||||
virtual void err(void);
|
||||
|
||||
virtual void err( const UnicodeString &message );
|
||||
@ -99,6 +105,8 @@ public:
|
||||
// convenience functions: sprintf() + errln() etc.
|
||||
void log(const char *fmt, ...);
|
||||
void logln(const char *fmt, ...);
|
||||
void info(const char *fmt, ...);
|
||||
void infoln(const char *fmt, ...);
|
||||
void err(const char *fmt, ...);
|
||||
void errln(const char *fmt, ...);
|
||||
|
||||
@ -161,6 +169,9 @@ public:
|
||||
void it_log( UnicodeString message );
|
||||
void it_logln( UnicodeString message );
|
||||
void it_logln( void );
|
||||
void it_info( UnicodeString message );
|
||||
void it_infoln( UnicodeString message );
|
||||
void it_infoln( void );
|
||||
void it_err(void);
|
||||
void it_err( UnicodeString message );
|
||||
void it_errln( UnicodeString message );
|
||||
|
Loading…
Reference in New Issue
Block a user