2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2015-04-30 01:10:04 +00:00
|
|
|
* Copyright (c) 1997-2015, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2000-03-10 00:42:27 +00:00
|
|
|
* IntlTest is a base class for tests. */
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
#ifndef _INTLTEST
|
|
|
|
#define _INTLTEST
|
|
|
|
|
2003-12-11 01:49:29 +00:00
|
|
|
// The following includes utypes.h, uobject.h and unistr.h
|
2001-10-08 23:26:58 +00:00
|
|
|
#include "unicode/fmtable.h"
|
2004-03-23 06:37:36 +00:00
|
|
|
#include "unicode/testlog.h"
|
2001-08-31 18:02:09 +00:00
|
|
|
|
2012-09-27 18:52:04 +00:00
|
|
|
|
|
|
|
#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS
|
|
|
|
/* deprecated - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
|
|
|
|
#include "unicode/utf_old.h"
|
|
|
|
#endif
|
|
|
|
|
2001-10-08 23:26:58 +00:00
|
|
|
U_NAMESPACE_USE
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2011-07-23 00:10:30 +00:00
|
|
|
#if U_PLATFORM == U_PF_OS390
|
2000-04-04 22:31:44 +00:00
|
|
|
// avoid collision with math.h/log()
|
2011-07-23 00:10:30 +00:00
|
|
|
// this must be after including utypes.h so that U_PLATFORM is actually defined
|
2000-04-04 22:31:44 +00:00
|
|
|
#pragma map(IntlTest::log( const UnicodeString &message ),"logos390")
|
|
|
|
#endif
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//convenience classes to ease porting code that uses the Java
|
|
|
|
//string-concatenation operator (moved from findword test by rtg)
|
|
|
|
UnicodeString UCharToUnicodeString(UChar c);
|
2003-11-21 00:10:52 +00:00
|
|
|
UnicodeString Int64ToUnicodeString(int64_t num);
|
2013-09-20 05:00:30 +00:00
|
|
|
//UnicodeString operator+(const UnicodeString& left, int64_t num); // Some compilers don't allow this because of the long type.
|
1999-08-16 21:50:52 +00:00
|
|
|
UnicodeString operator+(const UnicodeString& left, long num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, unsigned long num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, double num);
|
2013-06-26 06:31:09 +00:00
|
|
|
UnicodeString operator+(const UnicodeString& left, char num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, short num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, int num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, unsigned char num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, unsigned short num);
|
|
|
|
UnicodeString operator+(const UnicodeString& left, unsigned int num);
|
1999-08-16 21:50:52 +00:00
|
|
|
UnicodeString operator+(const UnicodeString& left, float num);
|
2002-09-21 00:43:14 +00:00
|
|
|
#if !UCONFIG_NO_FORMATTING
|
1999-08-16 21:50:52 +00:00
|
|
|
UnicodeString toString(const Formattable& f); // liu
|
2004-04-24 02:53:56 +00:00
|
|
|
UnicodeString toString(int32_t n);
|
2002-09-21 00:43:14 +00:00
|
|
|
#endif
|
2013-06-26 06:31:09 +00:00
|
|
|
UnicodeString toString(UBool b);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2001-06-11 17:21:58 +00:00
|
|
|
// Use the TESTCASE macro in subclasses of IntlTest. Define the
|
|
|
|
// runIndexedTest method in this fashion:
|
|
|
|
//
|
|
|
|
//| void MyTest::runIndexedTest(int32_t index, UBool exec,
|
|
|
|
//| const char* &name, char* /*par*/) {
|
|
|
|
//| switch (index) {
|
|
|
|
//| TESTCASE(0,TestSomething);
|
|
|
|
//| TESTCASE(1,TestSomethingElse);
|
|
|
|
//| TESTCASE(2,TestAnotherThing);
|
|
|
|
//| default: name = ""; break;
|
|
|
|
//| }
|
|
|
|
//| }
|
|
|
|
#define TESTCASE(id,test) \
|
|
|
|
case id: \
|
|
|
|
name = #test; \
|
|
|
|
if (exec) { \
|
|
|
|
logln(#test "---"); \
|
2009-11-13 19:25:21 +00:00
|
|
|
logln(); \
|
2001-06-11 17:21:58 +00:00
|
|
|
test(); \
|
|
|
|
} \
|
|
|
|
break
|
|
|
|
|
2010-06-15 15:54:53 +00:00
|
|
|
// More convenient macros. These allow easy reordering of the test cases.
|
|
|
|
//
|
|
|
|
//| void MyTest::runIndexedTest(int32_t index, UBool exec,
|
|
|
|
//| const char* &name, char* /*par*/) {
|
|
|
|
//| TESTCASE_AUTO_BEGIN;
|
|
|
|
//| TESTCASE_AUTO(TestSomething);
|
|
|
|
//| TESTCASE_AUTO(TestSomethingElse);
|
|
|
|
//| TESTCASE_AUTO(TestAnotherThing);
|
|
|
|
//| TESTCASE_AUTO_END;
|
|
|
|
//| }
|
|
|
|
#define TESTCASE_AUTO_BEGIN \
|
|
|
|
for(;;) { \
|
|
|
|
int32_t testCaseAutoNumber = 0
|
|
|
|
|
|
|
|
#define TESTCASE_AUTO(test) \
|
|
|
|
if (index == testCaseAutoNumber++) { \
|
|
|
|
name = #test; \
|
|
|
|
if (exec) { \
|
|
|
|
logln(#test "---"); \
|
|
|
|
logln(); \
|
|
|
|
test(); \
|
|
|
|
} \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
2014-02-25 21:21:49 +00:00
|
|
|
#define TESTCASE_AUTO_CLASS(TestClass) \
|
|
|
|
if (index == testCaseAutoNumber++) { \
|
|
|
|
name = #TestClass; \
|
|
|
|
if (exec) { \
|
|
|
|
logln(#TestClass "---"); \
|
|
|
|
logln(); \
|
|
|
|
TestClass test; \
|
|
|
|
callTest(test, par); \
|
|
|
|
} \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define TESTCASE_AUTO_CREATE_CLASS(TestClass) \
|
|
|
|
if (index == testCaseAutoNumber++) { \
|
|
|
|
name = #TestClass; \
|
|
|
|
if (exec) { \
|
|
|
|
logln(#TestClass "---"); \
|
|
|
|
logln(); \
|
|
|
|
LocalPointer<IntlTest> test(create##TestClass()); \
|
|
|
|
callTest(*test, par); \
|
|
|
|
} \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
2010-06-15 15:54:53 +00:00
|
|
|
#define TESTCASE_AUTO_END \
|
|
|
|
name = ""; \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
2012-12-10 19:18:04 +00:00
|
|
|
#define TEST_ASSERT_TRUE(x) \
|
2013-02-12 06:46:51 +00:00
|
|
|
assertTrue(#x, (x), FALSE, FALSE, __FILE__, __LINE__)
|
2012-12-10 19:18:04 +00:00
|
|
|
|
2013-09-12 01:27:29 +00:00
|
|
|
#define TEST_ASSERT_STATUS(x) \
|
|
|
|
assertSuccess(#x, (x), FALSE, __FILE__, __LINE__)
|
|
|
|
|
2004-03-23 06:37:36 +00:00
|
|
|
class IntlTest : public TestLog {
|
1999-08-16 21:50:52 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
IntlTest();
|
2009-11-13 19:25:21 +00:00
|
|
|
// TestLog has a virtual destructor.
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2010-07-12 15:24:57 +00:00
|
|
|
virtual UBool runTest( char* name = NULL, char* par = NULL, char *baseName = NULL); // not to be overidden
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-05-18 22:08:39 +00:00
|
|
|
virtual UBool setVerbose( UBool verbose = TRUE );
|
|
|
|
virtual UBool setNoErrMsg( UBool no_err_msg = TRUE );
|
|
|
|
virtual UBool setQuick( UBool quick = TRUE );
|
|
|
|
virtual UBool setLeaks( UBool leaks = TRUE );
|
2012-05-30 00:37:33 +00:00
|
|
|
virtual UBool setNotime( UBool no_time = TRUE );
|
2005-04-06 00:38:48 +00:00
|
|
|
virtual UBool setWarnOnMissingData( UBool warn_on_missing_data = TRUE );
|
2009-08-13 00:11:21 +00:00
|
|
|
virtual int32_t setThreadCount( int32_t count = 1);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
virtual int32_t getErrors( void );
|
2005-04-06 00:38:48 +00:00
|
|
|
virtual int32_t getDataErrors (void );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
virtual void setCaller( IntlTest* callingTest ); // for internal use only
|
|
|
|
virtual void setPath( char* path ); // for internal use only
|
|
|
|
|
1999-12-08 00:15:46 +00:00
|
|
|
virtual void log( const UnicodeString &message );
|
|
|
|
|
|
|
|
virtual void logln( const UnicodeString &message );
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
virtual void logln( void );
|
|
|
|
|
2013-09-17 00:55:39 +00:00
|
|
|
/**
|
|
|
|
* Replaces isICUVersionAtLeast and isICUVersionBefore
|
|
|
|
* log that an issue is known.
|
|
|
|
* Usually used this way:
|
|
|
|
* <code>if( ... && logKnownIssue("12345", "some bug")) continue; </code>
|
|
|
|
* @param ticket ticket string, "12345" or "cldrbug:1234"
|
|
|
|
* @param message optional message string
|
|
|
|
* @return true if test should be skipped
|
|
|
|
*/
|
2013-09-16 22:07:02 +00:00
|
|
|
UBool logKnownIssue( const char *ticket, const UnicodeString &message );
|
2013-09-17 00:55:39 +00:00
|
|
|
/**
|
|
|
|
* Replaces isICUVersionAtLeast and isICUVersionBefore
|
|
|
|
* log that an issue is known.
|
|
|
|
* Usually used this way:
|
|
|
|
* <code>if( ... && logKnownIssue("12345", "some bug")) continue; </code>
|
|
|
|
* @param ticket ticket string, "12345" or "cldrbug:1234"
|
|
|
|
* @return true if test should be skipped
|
|
|
|
*/
|
2013-09-16 22:07:02 +00:00
|
|
|
UBool logKnownIssue( const char *ticket );
|
2013-09-17 00:55:39 +00:00
|
|
|
/**
|
|
|
|
* Replaces isICUVersionAtLeast and isICUVersionBefore
|
|
|
|
* log that an issue is known.
|
|
|
|
* Usually used this way:
|
|
|
|
* <code>if( ... && logKnownIssue("12345", "some bug")) continue; </code>
|
|
|
|
* @param ticket ticket string, "12345" or "cldrbug:1234"
|
|
|
|
* @param message optional message string
|
|
|
|
* @return true if test should be skipped
|
|
|
|
*/
|
2013-09-16 22:07:02 +00:00
|
|
|
UBool logKnownIssue( const char *ticket, const char *fmt, ...);
|
|
|
|
|
2002-07-11 17:40:35 +00:00
|
|
|
virtual void info( const UnicodeString &message );
|
|
|
|
|
|
|
|
virtual void infoln( const UnicodeString &message );
|
|
|
|
|
|
|
|
virtual void infoln( void );
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
virtual void err(void);
|
2013-09-17 00:55:39 +00:00
|
|
|
|
1999-12-08 00:15:46 +00:00
|
|
|
virtual void err( const UnicodeString &message );
|
|
|
|
|
|
|
|
virtual void errln( const UnicodeString &message );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2005-04-06 00:38:48 +00:00
|
|
|
virtual void dataerr( const UnicodeString &message );
|
2005-04-05 20:12:22 +00:00
|
|
|
|
2005-04-06 00:38:48 +00:00
|
|
|
virtual void dataerrln( const UnicodeString &message );
|
2013-09-17 00:55:39 +00:00
|
|
|
|
2009-06-12 19:34:21 +00:00
|
|
|
void errcheckln(UErrorCode status, const UnicodeString &message );
|
2005-04-05 20:12:22 +00:00
|
|
|
|
2001-01-23 23:51:55 +00:00
|
|
|
// convenience functions: sprintf() + errln() etc.
|
|
|
|
void log(const char *fmt, ...);
|
|
|
|
void logln(const char *fmt, ...);
|
2002-07-11 17:40:35 +00:00
|
|
|
void info(const char *fmt, ...);
|
|
|
|
void infoln(const char *fmt, ...);
|
2001-01-23 23:51:55 +00:00
|
|
|
void err(const char *fmt, ...);
|
|
|
|
void errln(const char *fmt, ...);
|
2005-04-06 00:38:48 +00:00
|
|
|
void dataerr(const char *fmt, ...);
|
|
|
|
void dataerrln(const char *fmt, ...);
|
2013-06-26 06:31:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* logs an error (even if status==U_ZERO_ERROR), but
|
|
|
|
* calls dataerrln() or errln() depending on the type of error.
|
|
|
|
* Does not report the status code.
|
|
|
|
* @param status parameter for selecting whether errln or dataerrln is called.
|
|
|
|
*/
|
2009-06-12 19:34:21 +00:00
|
|
|
void errcheckln(UErrorCode status, const char *fmt, ...);
|
2001-01-23 23:51:55 +00:00
|
|
|
|
2000-12-03 03:29:39 +00:00
|
|
|
// Print ALL named errors encountered so far
|
|
|
|
void printErrors();
|
2013-09-16 22:07:02 +00:00
|
|
|
|
|
|
|
// print known issues. return TRUE if there were any.
|
|
|
|
UBool printKnownIssues();
|
2000-12-03 03:29:39 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
virtual void usage( void ) ;
|
|
|
|
|
2003-08-12 19:51:03 +00:00
|
|
|
/**
|
|
|
|
* Returns a uniform random value x, with 0.0 <= x < 1.0. Use
|
|
|
|
* with care: Does not return all possible values; returns one of
|
|
|
|
* 714,025 values, uniformly spaced. However, the period is
|
|
|
|
* effectively infinite. See: Numerical Recipes, section 7.1.
|
|
|
|
*
|
|
|
|
* @param seedp pointer to seed. Set *seedp to any negative value
|
|
|
|
* to restart the sequence.
|
|
|
|
*/
|
|
|
|
static float random(int32_t* seedp);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convenience method using a global seed.
|
|
|
|
*/
|
|
|
|
static float random();
|
|
|
|
|
2008-09-22 22:02:44 +00:00
|
|
|
enum { kMaxProps = 16 };
|
|
|
|
|
|
|
|
virtual void setProperty(const char* propline);
|
|
|
|
virtual const char* getProperty(const char* prop);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
protected:
|
2004-02-12 01:09:13 +00:00
|
|
|
/* JUnit-like assertions. Each returns TRUE if it succeeds. */
|
2013-02-12 06:46:51 +00:00
|
|
|
UBool assertTrue(const char* message, UBool condition, UBool quiet=FALSE, UBool possibleDataError=FALSE, const char *file=NULL, int line=0);
|
2004-06-04 00:19:50 +00:00
|
|
|
UBool assertFalse(const char* message, UBool condition, UBool quiet=FALSE);
|
2013-06-26 06:31:09 +00:00
|
|
|
/**
|
|
|
|
* @param possibleDataError - if TRUE, use dataerrln instead of errcheckln on failure
|
|
|
|
* @return TRUE on success, FALSE on failure.
|
|
|
|
*/
|
2013-09-12 01:27:29 +00:00
|
|
|
UBool assertSuccess(const char* message, UErrorCode ec, UBool possibleDataError=FALSE, const char *file=NULL, int line=0);
|
2004-02-12 01:09:13 +00:00
|
|
|
UBool assertEquals(const char* message, const UnicodeString& expected,
|
2009-06-12 19:34:21 +00:00
|
|
|
const UnicodeString& actual, UBool possibleDataError=FALSE);
|
2004-04-26 19:10:13 +00:00
|
|
|
UBool assertEquals(const char* message, const char* expected,
|
|
|
|
const char* actual);
|
2013-06-26 06:31:09 +00:00
|
|
|
UBool assertEquals(const char* message, UBool expected,
|
|
|
|
UBool actual);
|
2013-02-15 22:11:33 +00:00
|
|
|
UBool assertEquals(const char* message, int32_t expected, int32_t actual);
|
2013-06-26 06:31:09 +00:00
|
|
|
UBool assertEquals(const char* message, int64_t expected, int64_t actual);
|
2004-06-10 23:51:33 +00:00
|
|
|
#if !UCONFIG_NO_FORMATTING
|
2004-03-25 02:23:22 +00:00
|
|
|
UBool assertEquals(const char* message, const Formattable& expected,
|
2013-09-19 02:32:57 +00:00
|
|
|
const Formattable& actual, UBool possibleDataError=FALSE);
|
2004-06-10 23:51:33 +00:00
|
|
|
UBool assertEquals(const UnicodeString& message, const Formattable& expected,
|
|
|
|
const Formattable& actual);
|
|
|
|
#endif
|
2004-06-04 00:19:50 +00:00
|
|
|
UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=FALSE);
|
|
|
|
UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet=FALSE);
|
2004-03-11 14:06:25 +00:00
|
|
|
UBool assertSuccess(const UnicodeString& message, UErrorCode ec);
|
|
|
|
UBool assertEquals(const UnicodeString& message, const UnicodeString& expected,
|
2013-09-19 02:32:57 +00:00
|
|
|
const UnicodeString& actual, UBool possibleDataError=FALSE);
|
2004-04-26 19:10:13 +00:00
|
|
|
UBool assertEquals(const UnicodeString& message, const char* expected,
|
|
|
|
const char* actual);
|
2013-06-26 06:31:09 +00:00
|
|
|
UBool assertEquals(const UnicodeString& message, UBool expected, UBool actual);
|
|
|
|
UBool assertEquals(const UnicodeString& message, int32_t expected, int32_t actual);
|
|
|
|
UBool assertEquals(const UnicodeString& message, int64_t expected, int64_t actual);
|
2004-02-12 01:09:13 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); // overide !
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2010-07-12 15:24:57 +00:00
|
|
|
virtual UBool runTestLoop( char* testname, char* par, char *baseName );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
virtual int32_t IncErrorCount( void );
|
|
|
|
|
2005-04-06 00:38:48 +00:00
|
|
|
virtual int32_t IncDataErrorCount( void );
|
2005-04-05 20:12:22 +00:00
|
|
|
|
2000-05-18 22:08:39 +00:00
|
|
|
virtual UBool callTest( IntlTest& testToBeCalled, char* par );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
2005-07-18 16:32:26 +00:00
|
|
|
UBool verbose;
|
|
|
|
UBool no_err_msg;
|
|
|
|
UBool quick;
|
|
|
|
UBool leaks;
|
|
|
|
UBool warn_on_missing_data;
|
2012-05-30 00:37:33 +00:00
|
|
|
UBool no_time;
|
2009-08-13 00:11:21 +00:00
|
|
|
int32_t threadCount;
|
2000-12-08 20:33:48 +00:00
|
|
|
|
|
|
|
private:
|
2005-07-18 16:32:26 +00:00
|
|
|
UBool LL_linestart;
|
2000-12-08 20:33:48 +00:00
|
|
|
int32_t LL_indentlevel;
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
int32_t errorCount;
|
2005-04-06 00:38:48 +00:00
|
|
|
int32_t dataErrorCount;
|
1999-08-16 21:50:52 +00:00
|
|
|
IntlTest* caller;
|
2005-07-18 16:32:26 +00:00
|
|
|
char* testPath; // specifies subtests
|
2010-07-12 15:24:57 +00:00
|
|
|
|
|
|
|
char basePath[1024];
|
2013-09-16 22:07:02 +00:00
|
|
|
char currName[1024]; // current test name
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-10-15 08:03:56 +00:00
|
|
|
//FILE *testoutfp;
|
|
|
|
void *testoutfp;
|
|
|
|
|
2008-09-22 22:02:44 +00:00
|
|
|
const char* proplines[kMaxProps];
|
|
|
|
int32_t numProps;
|
|
|
|
|
2000-12-08 20:33:48 +00:00
|
|
|
protected:
|
2003-08-12 19:51:03 +00:00
|
|
|
|
2000-05-18 22:08:39 +00:00
|
|
|
virtual void LL_message( UnicodeString message, UBool newline );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
// used for collation result reporting, defined here for convenience
|
|
|
|
|
|
|
|
static UnicodeString &prettify(const UnicodeString &source, UnicodeString &target);
|
2001-07-18 18:38:53 +00:00
|
|
|
static UnicodeString prettify(const UnicodeString &source, UBool parseBackslash=FALSE);
|
2013-02-15 22:11:33 +00:00
|
|
|
// digits=-1 determines the number of digits automatically
|
2001-09-18 17:44:50 +00:00
|
|
|
static UnicodeString &appendHex(uint32_t number, int32_t digits, UnicodeString &target);
|
2013-02-15 22:11:33 +00:00
|
|
|
static UnicodeString toHex(uint32_t number, int32_t digits=-1);
|
|
|
|
static inline UnicodeString toHex(int32_t number, int32_t digits=-1) {
|
|
|
|
return toHex((uint32_t)number, digits);
|
|
|
|
}
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-07-31 17:29:43 +00:00
|
|
|
public:
|
2001-08-10 20:50:07 +00:00
|
|
|
static void setICU_DATA(); // Set up ICU_DATA if necessary.
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-02-28 21:37:55 +00:00
|
|
|
static const char* pathToDataDirectory();
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
public:
|
2000-05-18 22:08:39 +00:00
|
|
|
UBool run_phase2( char* name, char* par ); // internally, supports reporting memory leaks
|
2002-06-10 18:31:34 +00:00
|
|
|
static const char* loadTestData(UErrorCode& err);
|
2004-03-23 06:37:36 +00:00
|
|
|
virtual const char* getTestDataPath(UErrorCode& err);
|
2004-08-04 23:40:31 +00:00
|
|
|
static const char* getSourceTestData(UErrorCode& err);
|
2014-04-14 22:30:09 +00:00
|
|
|
static char *getUnidataPath(char path[]);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
// static members
|
|
|
|
public:
|
|
|
|
static IntlTest* gTest;
|
2003-02-28 21:37:55 +00:00
|
|
|
static const char* fgDataDir;
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
void it_log( UnicodeString message );
|
|
|
|
void it_logln( UnicodeString message );
|
|
|
|
void it_logln( void );
|
2002-07-11 17:40:35 +00:00
|
|
|
void it_info( UnicodeString message );
|
|
|
|
void it_infoln( UnicodeString message );
|
|
|
|
void it_infoln( void );
|
1999-08-16 21:50:52 +00:00
|
|
|
void it_err(void);
|
|
|
|
void it_err( UnicodeString message );
|
|
|
|
void it_errln( UnicodeString message );
|
2005-07-05 18:39:00 +00:00
|
|
|
void it_dataerr( UnicodeString message );
|
|
|
|
void it_dataerrln( UnicodeString message );
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-03-22 23:17:42 +00:00
|
|
|
/**
|
|
|
|
* This is a variant of cintltst/ccolltst.c:CharsToUChars().
|
|
|
|
* It converts a character string into a UnicodeString, with
|
|
|
|
* unescaping \u sequences.
|
|
|
|
*/
|
|
|
|
extern UnicodeString CharsToUnicodeString(const char* chars);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2004-02-12 01:09:13 +00:00
|
|
|
/* alias for CharsToUnicodeString */
|
|
|
|
extern UnicodeString ctou(const char* chars);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#endif // _INTLTEST
|