mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-7519 Because of certain compiler optimization options, remove usage of global variables in cintltst and use getter/setter functions instead.
X-SVN-Rev: 27907
This commit is contained in:
parent
8251996bb7
commit
bc0c9167d8
16 changed files with 175 additions and 94 deletions
|
@ -287,7 +287,7 @@ static void doTestVariant(UCollator* myCollation, const UChar source[], const UC
|
|||
}
|
||||
|
||||
/* convert the strings to UTF-8 and do try comparing with char iterator */
|
||||
if(QUICK <= 0) { /*!QUICK*/
|
||||
if(getTestOption(QUICK_OPTION) <= 0) { /*!QUICK*/
|
||||
char utf8Source[256], utf8Target[256];
|
||||
int32_t utf8SourceLen = 0, utf8TargetLen = 0;
|
||||
u_strToUTF8(utf8Source, 256, &utf8SourceLen, source, sLen, &status);
|
||||
|
@ -329,7 +329,7 @@ static void doTestVariant(UCollator* myCollation, const UChar source[], const UC
|
|||
int32_t i = 0;
|
||||
int32_t partialSizes[] = { 3, 1, 2, 4, 8, 20, 80 }; /* just size 3 in the quick mode */
|
||||
int32_t partialSizesSize = 1;
|
||||
if(QUICK <= 0) {
|
||||
if(getTestOption(QUICK_OPTION) <= 0) {
|
||||
partialSizesSize = 7;
|
||||
}
|
||||
/*log_verbose("partial sortkey test piecesize=");*/
|
||||
|
@ -344,7 +344,7 @@ static void doTestVariant(UCollator* myCollation, const UChar source[], const UC
|
|||
aescstrdup(source,-1), aescstrdup(target,-1), partialSizes[i]);
|
||||
}
|
||||
|
||||
if(QUICK <= 0 && norm != UCOL_ON) {
|
||||
if(getTestOption(QUICK_OPTION) <= 0 && norm != UCOL_ON) {
|
||||
/*log_verbose("N ");*/
|
||||
ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
|
||||
partialNormalizedSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************
|
||||
* Copyright (c) 1997-2009 International Business Machines
|
||||
* Copyright (c) 1997-2010 International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*****************************************************************************
|
||||
|
@ -899,7 +899,7 @@ void TestOpenVsOpenRules(){
|
|||
sizeOfStdSet = uset_size(stdSet);
|
||||
|
||||
adder = 1;
|
||||
if(QUICK)
|
||||
if(getTestOption(QUICK_OPTION))
|
||||
{
|
||||
adder = 10;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ int main(int argc, const char* const argv[])
|
|||
fprintf(stderr, "After initial u_cleanup: RB cache %s empty.\n", ures_dumpCacheContents()?"WAS NOT":"was");
|
||||
#endif
|
||||
|
||||
while (REPEAT_TESTS > 0) { /* Loop runs once per complete execution of the tests
|
||||
while (getTestOption(REPEAT_TESTS_OPTION) > 0) { /* Loop runs once per complete execution of the tests
|
||||
* used for -r (repeat) test option. */
|
||||
if (!initArgs(argc, argv, NULL, NULL)) {
|
||||
/* Error already displayed. */
|
||||
|
@ -129,7 +129,7 @@ int main(int argc, const char* const argv[])
|
|||
"#### ERROR! %s: u_init() failed with status = \"%s\".\n"
|
||||
"*** Check the ICU_DATA environment variable and \n"
|
||||
"*** check that the data files are present.\n", argv[0], u_errorName(errorCode));
|
||||
if(!WARN_ON_MISSING_DATA) {
|
||||
if(!getTestOption(WARN_ON_MISSING_DATA_OPTION)) {
|
||||
fprintf(stderr, "*** Exiting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
|
||||
u_cleanup();
|
||||
return 1;
|
||||
|
@ -148,7 +148,7 @@ int main(int argc, const char* const argv[])
|
|||
"*** %s! The converter for " TRY_CNV_2 " cannot be opened.\n"
|
||||
"*** Check the ICU_DATA environment variable and \n"
|
||||
"*** check that the data files are present.\n", warnOrErr);
|
||||
if(!WARN_ON_MISSING_DATA) {
|
||||
if(!getTestOption(WARN_ON_MISSING_DATA_OPTION)) {
|
||||
fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
|
||||
u_cleanup();
|
||||
return 1;
|
||||
|
@ -164,7 +164,7 @@ int main(int argc, const char* const argv[])
|
|||
"*** %s! The \"en\" locale resource bundle cannot be opened.\n"
|
||||
"*** Check the ICU_DATA environment variable and \n"
|
||||
"*** check that the data files are present.\n", warnOrErr);
|
||||
if(!WARN_ON_MISSING_DATA) {
|
||||
if(!getTestOption(WARN_ON_MISSING_DATA_OPTION)) {
|
||||
fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n*** purposely removed, to continue test anyway.\n");
|
||||
u_cleanup();
|
||||
return 1;
|
||||
|
@ -183,7 +183,7 @@ int main(int argc, const char* const argv[])
|
|||
} else {
|
||||
fprintf(stderr,
|
||||
"*** %s! Can not open a resource bundle for the default locale %s\n", warnOrErr, uloc_getDefault());
|
||||
if(!WARN_ON_MISSING_DATA) {
|
||||
if(!getTestOption(WARN_ON_MISSING_DATA_OPTION)) {
|
||||
fprintf(stderr, "*** Exitting. Use the '-w' option if data files were\n"
|
||||
"*** purposely removed, to continue test anyway.\n");
|
||||
u_cleanup();
|
||||
|
@ -200,8 +200,9 @@ int main(int argc, const char* const argv[])
|
|||
/* Tests acutally run HERE. TODO: separate command line option parsing & setting from test execution!! */
|
||||
nerrors = runTestRequest(root, argc, argv);
|
||||
|
||||
if (--REPEAT_TESTS > 0) {
|
||||
printf("Repeating tests %d more time(s)\n", REPEAT_TESTS);
|
||||
setTestOption(REPEAT_TESTS_OPTION, DECREMENT_OPTION_VALUE);
|
||||
if (getTestOption(REPEAT_TESTS_OPTION) > 0) {
|
||||
printf("Repeating tests %d more time(s)\n", getTestOption(REPEAT_TESTS_OPTION));
|
||||
}
|
||||
cleanUpTestTree(root);
|
||||
|
||||
|
|
|
@ -1696,7 +1696,7 @@ static void TestCEValidity()
|
|||
|
||||
/* testing tailored collation elements */
|
||||
log_verbose("Testing tailored elements\n");
|
||||
if(QUICK) {
|
||||
if(getTestOption(QUICK_OPTION)) {
|
||||
maxCount = sizeof(locale)/sizeof(locale[0]);
|
||||
} else {
|
||||
maxCount = uloc_countAvailable();
|
||||
|
@ -1719,7 +1719,7 @@ static void TestCEValidity()
|
|||
UColTokenParser src;
|
||||
uint32_t strength = 0;
|
||||
uint16_t specs = 0;
|
||||
if(QUICK) {
|
||||
if(getTestOption(QUICK_OPTION)) {
|
||||
loc = locale[count];
|
||||
} else {
|
||||
loc = uloc_getAvailable(count);
|
||||
|
|
|
@ -982,7 +982,7 @@ static void VerifyTranslation(void) {
|
|||
if (U_FAILURE(errorCode)) {
|
||||
log_err("error ures_getStringByKey returned %s\n", u_errorName(errorCode));
|
||||
}
|
||||
else if (QUICK && exemplarLen > 2048) {
|
||||
else if (getTestOption(QUICK_OPTION) && exemplarLen > 2048) {
|
||||
log_verbose("skipping test for %s\n", currLoc);
|
||||
}
|
||||
else if (uprv_strncmp(currLoc,"bem",3) == 0) {
|
||||
|
@ -1024,7 +1024,7 @@ static void VerifyTranslation(void) {
|
|||
if (U_FAILURE(errorCode)) {
|
||||
log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
|
||||
}
|
||||
if (QUICK) {
|
||||
if (getTestOption(QUICK_OPTION)) {
|
||||
end = 1;
|
||||
}
|
||||
else {
|
||||
|
@ -1054,7 +1054,7 @@ static void VerifyTranslation(void) {
|
|||
if (U_FAILURE(errorCode)) {
|
||||
log_err("error ures_getByKey returned %s\n", u_errorName(errorCode));
|
||||
}
|
||||
if (QUICK) {
|
||||
if (getTestOption(QUICK_OPTION)) {
|
||||
end = 1;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -770,7 +770,7 @@ static void logFailure (const char *platform, const char *test,
|
|||
*sEsc = *tEsc = *s = *t = 0;
|
||||
if(error == TRUE) {
|
||||
log_err("Difference between expected and generated order. Run test with -v for more info\n");
|
||||
} else if(VERBOSITY == 0) {
|
||||
} else if(getTestOption(VERBOSITY_OPTION) == 0) {
|
||||
return;
|
||||
}
|
||||
for(i = 0; i<sLen; i++) {
|
||||
|
@ -2216,10 +2216,10 @@ static void TestIncrementalNormalize(void) {
|
|||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollationResult result;
|
||||
|
||||
int32_t myQ = QUICK;
|
||||
int32_t myQ = getTestOption(QUICK_OPTION);
|
||||
|
||||
if(QUICK < 0) {
|
||||
QUICK = 1;
|
||||
if(getTestOption(QUICK_OPTION) < 0) {
|
||||
setTestOption(QUICK_OPTION, 1);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -2259,7 +2259,7 @@ static void TestIncrementalNormalize(void) {
|
|||
}
|
||||
}
|
||||
|
||||
QUICK = myQ;
|
||||
setTestOption(QUICK_OPTION, myQ);
|
||||
|
||||
|
||||
/* Test 2: Non-normal sequence in a string that extends to the last character*/
|
||||
|
@ -2948,12 +2948,12 @@ static void TestVariableTopSetting(void) {
|
|||
UChar first[256] = { 0 };
|
||||
UChar second[256] = { 0 };
|
||||
UParseError parseError;
|
||||
int32_t myQ = QUICK;
|
||||
int32_t myQ = getTestOption(QUICK_OPTION);
|
||||
|
||||
src.opts = &opts;
|
||||
|
||||
if(QUICK <= 0) {
|
||||
QUICK = 1;
|
||||
if(getTestOption(QUICK_OPTION) <= 0) {
|
||||
setTestOption(QUICK_OPTION, 1);
|
||||
}
|
||||
|
||||
/* this test will fail when normalization is turned on */
|
||||
|
@ -3069,7 +3069,7 @@ static void TestVariableTopSetting(void) {
|
|||
status = U_ZERO_ERROR;
|
||||
}
|
||||
|
||||
QUICK = myQ;
|
||||
setTestOption(QUICK_OPTION, myQ);
|
||||
|
||||
log_verbose("Testing setting variable top to contractions\n");
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*******************************************************************************
|
||||
|
@ -202,7 +202,7 @@ void TestConstruction1()
|
|||
int n;
|
||||
|
||||
log_err("Construction test failed for ures_open();\n");
|
||||
if(!VERBOSITY)
|
||||
if(!getTestOption(VERBOSITY_OPTION))
|
||||
log_info("(run verbose for more information)\n");
|
||||
|
||||
log_verbose("\nGot->");
|
||||
|
|
|
@ -1689,7 +1689,7 @@ TestCharNames() {
|
|||
}
|
||||
|
||||
/* Test getCharNameCharacters */
|
||||
if(!QUICK) {
|
||||
if(!getTestOption(QUICK_OPTION)) {
|
||||
enum { BUFSIZE = 256 };
|
||||
UErrorCode ec = U_ZERO_ERROR;
|
||||
char buf[BUFSIZE];
|
||||
|
@ -1798,7 +1798,7 @@ TestCharNames() {
|
|||
if (!ok) {
|
||||
log_err("FAIL: uprv_getCharNameCharacters() returned %s, expected %s (too many lowercase a-z are ok)\n",
|
||||
aescstrdup(pat, l1), aescstrdup(dumbPat, l2));
|
||||
} else if(VERBOSITY) {
|
||||
} else if(getTestOption(VERBOSITY_OPTION)) {
|
||||
log_verbose("Ok: uprv_getCharNameCharacters() returned %s\n", aescstrdup(pat, l1));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2008, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*
|
||||
|
@ -2743,7 +2743,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t
|
|||
|
||||
log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
|
||||
sourceLen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
|
||||
junk[0] = 0;
|
||||
|
@ -2941,7 +2941,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
|
|||
|
||||
log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
|
||||
sourcelen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
|
||||
junk[0] = 0;
|
||||
|
@ -3120,7 +3120,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, con
|
|||
|
||||
log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
|
||||
sourceLen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
|
||||
junk[0] = 0;
|
||||
|
@ -3298,7 +3298,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
|
|||
|
||||
log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
|
||||
sourcelen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
|
||||
junk[0] = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
***************************************************************************/
|
||||
/*****************************************************************************
|
||||
|
@ -224,7 +224,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen, const u
|
|||
|
||||
log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
|
||||
sourceLen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
char junk[9999];
|
||||
char offset_str[9999];
|
||||
|
@ -387,7 +387,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
|
|||
|
||||
log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
|
||||
sourcelen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
|
||||
junk[0] = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/*****************************************************************************
|
||||
|
@ -1273,7 +1273,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen, const uint8_
|
|||
|
||||
log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
|
||||
sourceLen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
char junk[999];
|
||||
char offset_str[999];
|
||||
|
@ -1448,7 +1448,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
|
|||
|
||||
log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
|
||||
sourcelen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
char junk[999];
|
||||
char offset_str[999];
|
||||
|
|
|
@ -428,7 +428,7 @@ static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen,
|
|||
log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
|
||||
sourceLen, targ-junkout);
|
||||
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
char junk[9999];
|
||||
char offset_str[9999];
|
||||
|
@ -589,7 +589,7 @@ static ETestConvertResult testConvertToU( const uint8_t *source, int sourcelen,
|
|||
|
||||
log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
|
||||
sourcelen, targ-junkout);
|
||||
if(VERBOSITY)
|
||||
if(getTestOption(VERBOSITY_OPTION))
|
||||
{
|
||||
char junk[9999];
|
||||
char offset_str[9999];
|
||||
|
@ -3530,7 +3530,7 @@ TestFullRoundtrip(const char* cp){
|
|||
|
||||
static void
|
||||
TestRoundTrippingAllUTF(void){
|
||||
if(!QUICK){
|
||||
if(!getTestOption(QUICK_OPTION)){
|
||||
log_verbose("Running exhaustive round trip test for BOCU-1\n");
|
||||
TestFullRoundtrip("BOCU-1");
|
||||
log_verbose("Running exhaustive round trip test for SCSU\n");
|
||||
|
|
|
@ -41,7 +41,7 @@ static void TestPUtilAPI(void){
|
|||
log_err("Error in uprv_modf. Expected IntegralValue=%f, Got=%f, \n Expected FractionalValue=%f, Got=%f\n",
|
||||
expn1, n1, expy1, y1);
|
||||
}
|
||||
if(VERBOSITY){
|
||||
if(getTestOption(VERBOSITY_OPTION)){
|
||||
log_verbose("[float] x = %f n = %f y = %f\n", value1, n1, y1);
|
||||
}
|
||||
log_verbose("Testing the API uprv_fmod()\n");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************
|
||||
* Copyright (c) 1997-2009, International Business Machines
|
||||
* Copyright (c) 1997-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
********************************************************************
|
||||
*
|
||||
|
@ -395,7 +395,7 @@ static void TestSelector()
|
|||
int32_t excluded_set_id;
|
||||
int32_t num_encodings;
|
||||
const char **encodings = getEncodingsFns[testCaseIdx](&num_encodings);
|
||||
if (QUICK && num_encodings > 25) {
|
||||
if (getTestOption(QUICK_OPTION) && num_encodings > 25) {
|
||||
uprv_free((void *)encodings);
|
||||
continue;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ static void TestSelector()
|
|||
int32_t length8, length16;
|
||||
|
||||
s = text_nextString(&text, &length8);
|
||||
if (s == NULL || (QUICK && text.number > 3)) {
|
||||
if (s == NULL || (getTestOption(QUICK_OPTION) && text.number > 3)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
* Copyright (C) 1996-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
********************************************************************************
|
||||
|
@ -830,3 +830,49 @@ static void help ( const char *argv0 )
|
|||
printf(" eg: to run just the utility tests type: cintltest /tsutil) \n");
|
||||
}
|
||||
|
||||
int32_t T_CTEST_EXPORT2
|
||||
getTestOption ( int32_t testOption ) {
|
||||
switch (testOption) {
|
||||
case VERBOSITY_OPTION:
|
||||
return VERBOSITY;
|
||||
case WARN_ON_MISSING_DATA_OPTION:
|
||||
return WARN_ON_MISSING_DATA;
|
||||
case QUICK_OPTION:
|
||||
return QUICK;
|
||||
case REPEAT_TESTS_OPTION:
|
||||
return REPEAT_TESTS;
|
||||
case ERR_MSG_OPTION:
|
||||
return ERR_MSG;
|
||||
case ICU_TRACE_OPTION:
|
||||
return ICU_TRACE;
|
||||
default :
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void T_CTEST_EXPORT2
|
||||
setTestOption ( int32_t testOption, int32_t value) {
|
||||
if (value == DECREMENT_OPTION_VALUE) {
|
||||
value = getTestOption(testOption);
|
||||
--value;
|
||||
}
|
||||
switch (testOption) {
|
||||
case VERBOSITY_OPTION:
|
||||
VERBOSITY = value;
|
||||
break;
|
||||
case WARN_ON_MISSING_DATA_OPTION:
|
||||
WARN_ON_MISSING_DATA = value;
|
||||
break;
|
||||
case QUICK_OPTION:
|
||||
QUICK = value;
|
||||
break;
|
||||
case REPEAT_TESTS_OPTION:
|
||||
REPEAT_TESTS = value;
|
||||
break;
|
||||
case ICU_TRACE_OPTION:
|
||||
ICU_TRACE = value;
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* Copyright (C) 1996-2009, International Business Machines
|
||||
* Copyright (C) 1996-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
********************************************************************************
|
||||
|
@ -23,53 +23,61 @@ typedef struct TestNode TestNode;
|
|||
U_CDECL_END
|
||||
|
||||
/**
|
||||
* Set this to zero to disable log_verbose() messages.
|
||||
* Otherwise nonzero to see log_verbose() messages.
|
||||
*
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API int REPEAT_TESTS;
|
||||
|
||||
/**
|
||||
* Set this to zero to disable log_verbose() messages.
|
||||
* Otherwise nonzero to see log_verbose() messages.
|
||||
*
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API int VERBOSITY;
|
||||
|
||||
/**
|
||||
* Set this to zero to disable log_verbose() messages.
|
||||
* Otherwise nonzero to see log_verbose() messages.
|
||||
*
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API int ERR_MSG;
|
||||
|
||||
/**
|
||||
* Set this to zero to disable some of the slower tests.
|
||||
* Otherwise nonzero to run the slower tests.
|
||||
*
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API int QUICK;
|
||||
|
||||
/**
|
||||
* Set this to nonzero to warn (not error) on missing data.
|
||||
* Otherwise, zero will cause an error to be propagated when data is not available.
|
||||
* Affects the behavior of log_dataerr.
|
||||
*
|
||||
* @see log_data_err
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API int WARN_ON_MISSING_DATA;
|
||||
|
||||
/**
|
||||
* ICU tracing level, is set by command line option
|
||||
* This is use to set or get the option value for REPEAT_TESTS.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
extern T_CTEST_EXPORT_API UTraceLevel ICU_TRACE;
|
||||
#define REPEAT_TESTS_OPTION 1
|
||||
|
||||
/**
|
||||
* This is use to set or get the option value for VERBOSITY.
|
||||
* When option is set to zero to disable log_verbose() messages.
|
||||
* Otherwise nonzero to see log_verbose() messages.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#define VERBOSITY_OPTION 2
|
||||
|
||||
/**
|
||||
* This is use to set or get the option value for ERR_MSG.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#define ERR_MSG_OPTION 3
|
||||
|
||||
/**
|
||||
* This is use to set or get the option value for QUICK.
|
||||
* When option is zero, disable some of the slower tests.
|
||||
* Otherwise nonzero to run the slower tests.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#define QUICK_OPTION 4
|
||||
|
||||
/**
|
||||
* This is use to set or get the option value for WARN_ON_MISSING_DATA.
|
||||
* When option is nonzero, warn on missing data.
|
||||
* Otherwise, errors are propagated when data is not available.
|
||||
* Affects the behavior of log_dataerr.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @see log_data_err
|
||||
* @internal
|
||||
*/
|
||||
#define WARN_ON_MISSING_DATA_OPTION 5
|
||||
|
||||
/**
|
||||
* This is use to set or get the option value for ICU_TRACE.
|
||||
* ICU tracing level, is set by command line option.
|
||||
* Use with set/getTestOption().
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#define ICU_TRACE_OPTION 6
|
||||
|
||||
/**
|
||||
* Maximum amount of memory uprv_malloc should allocate before returning NULL.
|
||||
|
@ -85,6 +93,32 @@ extern T_CTEST_EXPORT_API size_t MAX_MEMORY_ALLOCATION;
|
|||
*/
|
||||
extern T_CTEST_EXPORT_API int32_t ALLOCATION_COUNT;
|
||||
|
||||
/**
|
||||
* Pass to setTestOption to decrement the test option value.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#define DECREMENT_OPTION_VALUE -99
|
||||
|
||||
/**
|
||||
* Gets the test option set on commandline.
|
||||
*
|
||||
* @param testOption macro definition for the individual test option
|
||||
* @return value of test option, zero if option is not set or off
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
T_CTEST_API int32_t T_CTEST_EXPORT2
|
||||
getTestOption ( int32_t testOption );
|
||||
|
||||
/**
|
||||
* Sets the test option with value given on commandline.
|
||||
*
|
||||
* @param testOption macro definition for the individual test option
|
||||
* @param value to set the test option to
|
||||
* @internal Internal APIs for testing purpose only
|
||||
*/
|
||||
T_CTEST_API void T_CTEST_EXPORT2
|
||||
setTestOption ( int32_t testOption, int32_t value);
|
||||
|
||||
/**
|
||||
* Show the names of all nodes.
|
||||
|
|
Loading…
Add table
Reference in a new issue