mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-11 08:01:32 +00:00
ICU-7068 Add statements to ensure that uconfigtest passes
X-SVN-Rev: 26466
This commit is contained in:
parent
1c3a5ed74a
commit
c6385f6209
57 changed files with 275 additions and 121 deletions
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2008, International Business Machines
|
||||
* Copyright (C) 1999-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
@ -1393,7 +1393,11 @@ main(int argc, char **argv)
|
|||
|
||||
goto normal_exit;
|
||||
error_exit:
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
ret = 1;
|
||||
#else
|
||||
fprintf(stderr, "uconv error: UCONFIG_NO_LEGACY_CONVERSION is on. See uconfig.h\n");
|
||||
#endif
|
||||
normal_exit:
|
||||
|
||||
if (outfile != stdout) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "unicode/bmsearch.h"
|
||||
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
|
||||
//#define USE_SAFE_CASTS
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/putil.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/ucol.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
#include "unicode/uobject.h"
|
||||
#include "unicode/ucol.h"
|
||||
|
|
|
@ -76,7 +76,7 @@ void addAllTests(TestNode** root)
|
|||
#if !UCONFIG_NO_TRANSLITERATION
|
||||
addUTransTest(root);
|
||||
#endif
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION
|
||||
addUSpoofTest(root);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,12 +48,14 @@ void addBrkIterAPITest(TestNode** root);
|
|||
|
||||
void addBrkIterAPITest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestBreakIteratorCAPI, "tstxtbd/cbiapts/TestBreakIteratorCAPI");
|
||||
addTest(root, &TestBreakIteratorSafeClone, "tstxtbd/cbiapts/TestBreakIteratorSafeClone");
|
||||
addTest(root, &TestBreakIteratorUText, "tstxtbd/cbiapts/TestBreakIteratorUText");
|
||||
#endif
|
||||
addTest(root, &TestBreakIteratorRules, "tstxtbd/cbiapts/TestBreakIteratorRules");
|
||||
addTest(root, &TestBreakIteratorRuleError, "tstxtbd/cbiapts/TestBreakIteratorRuleError");
|
||||
addTest(root, &TestBreakIteratorStatusVec, "tstxtbd/cbiapts/TestBreakIteratorStatusVec");
|
||||
addTest(root, &TestBreakIteratorUText, "tstxtbd/cbiapts/TestBreakIteratorUText");
|
||||
}
|
||||
|
||||
#define CLONETEST_ITERATOR_COUNT 2
|
||||
|
|
|
@ -137,14 +137,18 @@ void addTestConvert(TestNode** root)
|
|||
addTest(root, &TestCCSID, "tsconv/ccapitst/TestCCSID");
|
||||
addTest(root, &TestJ932, "tsconv/ccapitst/TestJ932");
|
||||
addTest(root, &TestJ1968, "tsconv/ccapitst/TestJ1968");
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestLMBCSMaxChar, "tsconv/ccapitst/TestLMBCSMaxChar");
|
||||
#endif
|
||||
addTest(root, &TestEBCDICSwapLFNL, "tsconv/ccapitst/TestEBCDICSwapLFNL");
|
||||
addTest(root, &TestConvertEx, "tsconv/ccapitst/TestConvertEx");
|
||||
addTest(root, &TestConvertExFromUTF8, "tsconv/ccapitst/TestConvertExFromUTF8");
|
||||
addTest(root, &TestConvertAlgorithmic, "tsconv/ccapitst/TestConvertAlgorithmic");
|
||||
addTest(root, &TestDefaultConverterError, "tsconv/ccapitst/TestDefaultConverterError");
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestToUCountPending, "tsconv/ccapitst/TestToUCountPending");
|
||||
addTest(root, &TestFromUCountPending, "tsconv/ccapitst/TestFromUCountPending");
|
||||
#endif
|
||||
addTest(root, &TestDefaultName, "tsconv/ccapitst/TestDefaultName");
|
||||
addTest(root, &TestCompareNames, "tsconv/ccapitst/TestCompareNames");
|
||||
addTest(root, &TestSubstString, "tsconv/ccapitst/TestSubstString");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2008, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/********************************************************************************
|
||||
|
@ -44,7 +44,7 @@ void addCollTest(TestNode** root)
|
|||
addCollIterTest(root);
|
||||
addAllCollTest(root);
|
||||
addMiscCollTest(root);
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
|
||||
addSearchTest(root);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1343,11 +1343,13 @@ void addCLDRTest(TestNode** root);
|
|||
|
||||
void addCLDRTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
TESTCASE(TestLocaleStructure);
|
||||
TESTCASE(TestCurrencyList);
|
||||
#endif
|
||||
TESTCASE(TestConsistentCountryInfo);
|
||||
TESTCASE(VerifyTranslation);
|
||||
TESTCASE(TestExemplarSet);
|
||||
TESTCASE(TestCurrencyList);
|
||||
TESTCASE(TestLocaleDisplayPattern);
|
||||
TESTCASE(TestCoverage);
|
||||
}
|
||||
|
|
|
@ -206,7 +206,9 @@ void addLocaleTest(TestNode** root)
|
|||
TESTCASE(TestDisplayNames);
|
||||
TESTCASE(TestGetAvailableLocales);
|
||||
TESTCASE(TestDataDirectory);
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
TESTCASE(TestISOFunctions);
|
||||
#endif
|
||||
TESTCASE(TestISO3Fallback);
|
||||
TESTCASE(TestUninstalledISO3Names);
|
||||
TESTCASE(TestSimpleDisplayNames);
|
||||
|
@ -219,7 +221,9 @@ void addLocaleTest(TestNode** root)
|
|||
TESTCASE(TestDisplayKeywords);
|
||||
TESTCASE(TestDisplayKeywordValues);
|
||||
TESTCASE(TestGetBaseName);
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
TESTCASE(TestGetLocale);
|
||||
#endif
|
||||
TESTCASE(TestDisplayNameWarning);
|
||||
TESTCASE(TestNonexistentLanguageExemplars);
|
||||
TESTCASE(TestLocDataErrorCodeChaining);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2003-2008, International Business Machines
|
||||
* Copyright (c) 2003-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Author: Alan Liu
|
||||
|
@ -26,7 +26,9 @@ void addPosixTest(TestNode** root);
|
|||
|
||||
void addPosixTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestMessageCatalog, "tsutil/cposxtst/TestMessageCatalog");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
|
|
@ -93,15 +93,18 @@ void addResourceBundleTest(TestNode** root);
|
|||
|
||||
void addResourceBundleTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestConstruction1, "tsutil/crestst/TestConstruction1");
|
||||
addTest(root, &TestOpenDirect, "tsutil/crestst/TestOpenDirect");
|
||||
addTest(root, &TestResourceBundles, "tsutil/crestst/TestResourceBundles");
|
||||
addTest(root, &TestTable32, "tsutil/crestst/TestTable32");
|
||||
addTest(root, &TestFallback, "tsutil/crestst/TestFallback");
|
||||
addTest(root, &TestAliasConflict, "tsutil/crestst/TestAliasConflict");
|
||||
addTest(root, &TestFileStream, "tsutil/crestst/TestFileStream");
|
||||
addTest(root, &TestGetSize, "tsutil/crestst/TestGetSize");
|
||||
addTest(root, &TestGetLocaleByType, "tsutil/crestst/TestGetLocaleByType");
|
||||
#endif
|
||||
addTest(root, &TestFallback, "tsutil/crestst/TestFallback");
|
||||
addTest(root, &TestAliasConflict, "tsutil/crestst/TestAliasConflict");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -189,13 +189,10 @@ static void TestCLDRVersion(void);
|
|||
void addNEWResourceBundleTest(TestNode** root)
|
||||
{
|
||||
addTest(root, &TestErrorCodes, "tsutil/creststn/TestErrorCodes");
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestEmptyBundle, "tsutil/creststn/TestEmptyBundle");
|
||||
addTest(root, &TestConstruction1, "tsutil/creststn/TestConstruction1");
|
||||
addTest(root, &TestResourceBundles, "tsutil/creststn/TestResourceBundles");
|
||||
addTest(root, &TestFallback, "tsutil/creststn/TestFallback");
|
||||
addTest(root, &TestGetVersion, "tsutil/creststn/TestGetVersion");
|
||||
addTest(root, &TestGetVersionColl, "tsutil/creststn/TestGetVersionColl");
|
||||
addTest(root, &TestAliasConflict, "tsutil/creststn/TestAliasConflict");
|
||||
addTest(root, &TestNewTypes, "tsutil/creststn/TestNewTypes");
|
||||
addTest(root, &TestEmptyTypes, "tsutil/creststn/TestEmptyTypes");
|
||||
addTest(root, &TestBinaryCollationData, "tsutil/creststn/TestBinaryCollationData");
|
||||
|
@ -204,15 +201,20 @@ void addNEWResourceBundleTest(TestNode** root)
|
|||
addTest(root, &TestDecodedBundle, "tsutil/creststn/TestDecodedBundle");
|
||||
addTest(root, &TestResourceLevelAliasing, "tsutil/creststn/TestResourceLevelAliasing");
|
||||
addTest(root, &TestDirectAccess, "tsutil/creststn/TestDirectAccess");
|
||||
addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
|
||||
addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
|
||||
addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes");
|
||||
addTest(root, &TestGetUTF8String, "tsutil/creststn/TestGetUTF8String");
|
||||
addTest(root, &TestCLDRVersion, "tsutil/creststn/TestCLDRVersion");
|
||||
#endif
|
||||
addTest(root, &TestFallback, "tsutil/creststn/TestFallback");
|
||||
addTest(root, &TestGetVersion, "tsutil/creststn/TestGetVersion");
|
||||
addTest(root, &TestGetVersionColl, "tsutil/creststn/TestGetVersionColl");
|
||||
addTest(root, &TestAliasConflict, "tsutil/creststn/TestAliasConflict");
|
||||
addTest(root, &TestGetKeywordValues, "tsutil/creststn/TestGetKeywordValues");
|
||||
addTest(root, &TestGetFunctionalEquivalent,"tsutil/creststn/TestGetFunctionalEquivalent");
|
||||
addTest(root, &TestJB3763, "tsutil/creststn/TestJB3763");
|
||||
addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
|
||||
addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
|
||||
addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes");
|
||||
addTest(root, &TestStackReuse, "tsutil/creststn/TestStackReuse");
|
||||
addTest(root, &TestGetUTF8String, "tsutil/creststn/TestGetUTF8String");
|
||||
addTest(root, &TestCLDRVersion, "tsutil/creststn/TestCLDRVersion");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -995,14 +995,14 @@ void addCaseTest(TestNode** root) {
|
|||
/* cstrcase.c functions, declared in cucdtst.h */
|
||||
addTest(root, &TestCaseLower, "tsutil/cstrcase/TestCaseLower");
|
||||
addTest(root, &TestCaseUpper, "tsutil/cstrcase/TestCaseUpper");
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestCaseTitle, "tsutil/cstrcase/TestCaseTitle");
|
||||
addTest(root, &TestCaseDutchTitle, "tsutil/cstrcase/TestCaseDutchTitle");
|
||||
#endif
|
||||
addTest(root, &TestCaseFolding, "tsutil/cstrcase/TestCaseFolding");
|
||||
addTest(root, &TestCaseCompare, "tsutil/cstrcase/TestCaseCompare");
|
||||
addTest(root, &TestUCaseMap, "tsutil/cstrcase/TestUCaseMap");
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestUCaseMapToTitle, "tsutil/cstrcase/TestUCaseMapToTitle");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -53,7 +53,9 @@ addUCharTransformTest(TestNode** root)
|
|||
addTest(root, &Test_FromUTF8Lenient, "custrtrn/Test_FromUTF8Lenient");
|
||||
addTest(root, &Test_UChar_WCHART_API, "custrtrn/Test_UChar_WCHART_API");
|
||||
addTest(root, &Test_widestrs, "custrtrn/Test_widestrs");
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &Test_WCHART_LongString, "custrtrn/Test_WCHART_LongString");
|
||||
#endif
|
||||
}
|
||||
|
||||
static const UChar32 src32[]={
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2007, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
***************************************************************************/
|
||||
/*****************************************************************************
|
||||
|
@ -104,7 +104,9 @@ void addTestConverterFallBack(TestNode** root);
|
|||
|
||||
void addTestConverterFallBack(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestConverterFallBack, "tsconv/ncnvfbts/TestConverterFallBack");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1901,9 +1901,8 @@ TestUnicodeSet() {
|
|||
#endif
|
||||
"IMAP-mailbox-name"
|
||||
};
|
||||
|
||||
static const char *const lmbcsNames[]={
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
static const char *const lmbcsNames[]={
|
||||
"LMBCS-1",
|
||||
"LMBCS-2",
|
||||
"LMBCS-3",
|
||||
|
@ -1916,8 +1915,8 @@ TestUnicodeSet() {
|
|||
"LMBCS-17",
|
||||
"LMBCS-18",
|
||||
"LMBCS-19"
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
static const NameRange nameRanges[]={
|
||||
{ "US-ASCII", 0, 0x7f, -1, -1, 0x80, 0x10ffff },
|
||||
|
@ -1984,6 +1983,7 @@ TestUnicodeSet() {
|
|||
ucnv_close(cnv);
|
||||
}
|
||||
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
/* test LMBCS variants which convert all of Unicode except for U+F6xx */
|
||||
for(i=0; i<LENGTHOF(lmbcsNames); ++i) {
|
||||
errorCode=U_ZERO_ERROR;
|
||||
|
@ -2006,6 +2006,7 @@ TestUnicodeSet() {
|
|||
|
||||
ucnv_close(cnv);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* test specific sets */
|
||||
for(i=0; i<LENGTHOF(nameRanges); ++i) {
|
||||
|
|
|
@ -227,8 +227,10 @@ static void TestOutBufSizes(void)
|
|||
|
||||
void addTestNewConvert(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestInBufSizes, "tsconv/nucnvtst/TestInBufSizes");
|
||||
addTest(root, &TestOutBufSizes, "tsconv/nucnvtst/TestOutBufSizes");
|
||||
#endif
|
||||
addTest(root, &TestConverterTypesAndStarters, "tsconv/nucnvtst/TestConverterTypesAndStarters");
|
||||
addTest(root, &TestAmbiguous, "tsconv/nucnvtst/TestAmbiguous");
|
||||
addTest(root, &TestSignatureDetection, "tsconv/nucnvtst/TestSignatureDetection");
|
||||
|
@ -253,7 +255,9 @@ void addTestNewConvert(TestNode** root)
|
|||
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestSBCS, "tsconv/nucnvtst/TestSBCS");
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestDBCS, "tsconv/nucnvtst/TestDBCS");
|
||||
#endif
|
||||
addTest(root, &TestMBCS, "tsconv/nucnvtst/TestMBCS");
|
||||
|
||||
#ifdef U_ENABLE_GENERIC_ISO_2022
|
||||
|
@ -290,7 +294,7 @@ void addTestNewConvert(TestNode** root)
|
|||
#endif
|
||||
|
||||
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION && !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestCoverageMBCS, "tsconv/nucnvtst/TestCoverageMBCS");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
**/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -69,7 +69,9 @@ void addUSpoofTest(TestNode** root);
|
|||
|
||||
void addUSpoofTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
addTest(root, &TestUSpoofCAPI, "uspoof/TestUSpoofCAPI");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -47,6 +47,7 @@ UStringPrepProfileType getTypeFromProfileName(const char* profileName);
|
|||
void
|
||||
addUStringPrepTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &Test_nfs4_cs_prep_data, "spreptst/Test_nfs4_cs_prep_data");
|
||||
addTest(root, &Test_nfs4_cis_prep_data, "spreptst/Test_nfs4_cis_prep_data");
|
||||
addTest(root, &Test_nfs4_mixed_prep_data, "spreptst/Test_nfs4_mixed_prep_data");
|
||||
|
@ -54,6 +55,7 @@ addUStringPrepTest(TestNode** root)
|
|||
addTest(root, &Test_nfs4_cis_prep, "spreptst/Test_nfs4_cis_prep");
|
||||
addTest(root, &Test_nfs4_mixed_prep, "spreptst/Test_nfs4_mixed_prep");
|
||||
addTest(root, &TestBEAMWarning, "spreptst/TestBEAMWarning");
|
||||
#endif
|
||||
addTest(root, &TestCoverage, "spreptst/TestCoverage");
|
||||
addTest(root, &TestStringPrepProfiles, "spreptst/TestStringPrepProfiles");
|
||||
}
|
||||
|
|
|
@ -42,8 +42,10 @@ void addUCsdetTest(TestNode** root)
|
|||
addTest(root, &TestInputFilter, "ucsdetst/TestInputFilter");
|
||||
addTest(root, &TestChaining, "ucsdetst/TestErrorChaining");
|
||||
addTest(root, &TestBufferOverflow, "ucsdetst/TestBufferOverflow");
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestIBM424, "ucsdetst/TestIBM424");
|
||||
addTest(root, &TestIBM420, "ucsdetst/TestIBM420");
|
||||
#endif
|
||||
}
|
||||
|
||||
static int32_t preflight(const UChar *src, int32_t length, UConverter *cnv)
|
||||
|
|
|
@ -80,16 +80,18 @@ void addUDataTest(TestNode** root);
|
|||
void
|
||||
addUDataTest(TestNode** root)
|
||||
{
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &TestUDataOpen, "udatatst/TestUDataOpen" );
|
||||
addTest(root, &TestUDataOpenChoiceDemo1, "udatatst/TestUDataOpenChoiceDemo1");
|
||||
addTest(root, &TestUDataOpenChoiceDemo2, "udatatst/TestUDataOpenChoiceDemo2");
|
||||
addTest(root, &TestUDataGetInfo, "udatatst/TestUDataGetInfo" );
|
||||
addTest(root, &TestUDataGetMemory, "udatatst/TestUDataGetMemory" );
|
||||
addTest(root, &TestUDataSetAppData, "udatatst/TestUDataSetAppData" );
|
||||
addTest(root, &TestErrorConditions, "udatatst/TestErrorConditions");
|
||||
addTest(root, &TestAppData, "udatatst/TestAppData" );
|
||||
addTest(root, &TestICUDataName, "udatatst/TestICUDataName" );
|
||||
addTest(root, &TestSwapData, "udatatst/TestSwapData" );
|
||||
#endif
|
||||
addTest(root, &TestUDataSetAppData, "udatatst/TestUDataSetAppData" );
|
||||
addTest(root, &TestICUDataName, "udatatst/TestICUDataName" );
|
||||
addTest(root, &PointerTableOfContents, "udatatst/PointerTableOfContents" );
|
||||
addTest(root, &SetBadCommonData, "udatatst/SetBadCommonData" );
|
||||
addTest(root, &TestUDataFileAccess, "udatatst/TestUDataFileAccess" );
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
|
||||
|
||||
#include "unicode/usearch.h"
|
||||
#include "unicode/ustring.h"
|
||||
|
|
|
@ -67,9 +67,15 @@ void
|
|||
ConversionTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
|
||||
if (exec) logln("TestSuite ConversionTest: ");
|
||||
switch (index) {
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 0: name="TestToUnicode"; if (exec) TestToUnicode(); break;
|
||||
case 1: name="TestFromUnicode"; if (exec) TestFromUnicode(); break;
|
||||
case 2: name="TestGetUnicodeSet"; if (exec) TestGetUnicodeSet(); break;
|
||||
#else
|
||||
case 0:
|
||||
case 1:
|
||||
case 2: name="skip"; break;
|
||||
#endif
|
||||
case 3: name="TestGetUnicodeSet2"; if (exec) TestGetUnicodeSet2(); break;
|
||||
default: name=""; break; //needed to end loop
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ void CharsetDetectionTest::runIndexedTest( int32_t index, UBool exec, const char
|
|||
case 5: name = "DetectionTest";
|
||||
if (exec) DetectionTest();
|
||||
break;
|
||||
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
case 6: name = "IBM424Test";
|
||||
if (exec) IBM424Test();
|
||||
break;
|
||||
|
@ -84,7 +84,10 @@ void CharsetDetectionTest::runIndexedTest( int32_t index, UBool exec, const char
|
|||
case 7: name = "IBM420Test";
|
||||
if (exec) IBM420Test();
|
||||
break;
|
||||
|
||||
#else
|
||||
case 6:
|
||||
case 7: name = "skip"; break;
|
||||
#endif
|
||||
case 8: name = "Ticket6394Test";
|
||||
if (exec) Ticket6394Test();
|
||||
break;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_FILE_IO
|
||||
|
||||
#include "unicode/uchar.h"
|
||||
#include "unicode/tstdtmod.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 2002-2005, International Business Machines Corporation and
|
||||
* Copyright (c) 2002-2009, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_FILE_IO
|
||||
|
||||
#include "tscoll.h"
|
||||
#include "uvector.h"
|
||||
|
|
|
@ -646,12 +646,16 @@ UBool IntlTest::runTestLoop( char* testname, char* par )
|
|||
gTest = this;
|
||||
do {
|
||||
this->runIndexedTest( index, FALSE, name, par );
|
||||
if (!name || (name[0] == 0))
|
||||
break;
|
||||
if (!testname) {
|
||||
run_this_test = TRUE;
|
||||
}else{
|
||||
run_this_test = (UBool) (strcmp( name, testname ) == 0);
|
||||
if (strcmp(name,"skip") == 0) {
|
||||
run_this_test = FALSE;
|
||||
} else {
|
||||
if (!name || (name[0] == 0))
|
||||
break;
|
||||
if (!testname) {
|
||||
run_this_test = TRUE;
|
||||
}else{
|
||||
run_this_test = (UBool) (strcmp( name, testname ) == 0);
|
||||
}
|
||||
}
|
||||
if (run_this_test) {
|
||||
lastErrorCount = errorCount;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2008, International Business Machines
|
||||
* Copyright (c) 1997-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -112,8 +112,10 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
|
|||
TESTCLASS(27,AstroTest);
|
||||
TESTCLASS(28,CalendarCaseTest);
|
||||
TESTCLASS(29,TimeZoneRuleTest);
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
TESTCLASS(30,DataDrivenCalendarTest);
|
||||
TESTCLASS(31,DataDrivenFormatTest);
|
||||
#endif
|
||||
TESTCLASS(32,IntlTestDateTimePatternGeneratorAPI);
|
||||
TESTCLASS(33,TimeZoneOffsetLocalTest);
|
||||
TESTCLASS(34,TimeZoneFormatTest);
|
||||
|
|
|
@ -180,13 +180,16 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam
|
|||
|
||||
break;
|
||||
|
||||
case 14: name = "spoof";
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
case 14:
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO
|
||||
name = "spoof";
|
||||
if (exec) {
|
||||
logln("TestSuite SpoofDetection---"); logln();
|
||||
IntlTestSpoof test;
|
||||
callTest(test, par);
|
||||
}
|
||||
#else
|
||||
name = "skip";
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
|
@ -1833,6 +1833,7 @@ IntlTestRBNF::TestAllLocales()
|
|||
+ "ERROR could not instantiate -> " + u_errorName(status));
|
||||
continue;
|
||||
}
|
||||
#if !UCONFIG_NO_COLLATION
|
||||
for (unsigned int numidx = 0; numidx < sizeof(numbers)/sizeof(double); numidx++) {
|
||||
double n = numbers[numidx];
|
||||
UnicodeString str;
|
||||
|
@ -1876,6 +1877,7 @@ IntlTestRBNF::TestAllLocales()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
delete f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO
|
||||
|
||||
#include "itspoof.h"
|
||||
#include "unicode/uspoof.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define INTLTESTSPOOF_H
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO
|
||||
#include "unicode/uspoof.h"
|
||||
#include "intltest.h"
|
||||
|
||||
|
@ -37,5 +37,5 @@ public:
|
|||
const char *input, const char *expected, int32_t lineNum);
|
||||
};
|
||||
|
||||
#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO
|
||||
#endif
|
||||
|
|
|
@ -213,7 +213,9 @@ void LocaleTest::runIndexedTest( int32_t index, UBool exec, const char* &name, c
|
|||
TESTCASE(24, TestKeywordVariants);
|
||||
TESTCASE(25, TestKeywordVariantParsing);
|
||||
TESTCASE(26, TestGetBaseName);
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
TESTCASE(27, TestGetLocale);
|
||||
#endif
|
||||
TESTCASE(28, TestVariantWithOutCountry);
|
||||
TESTCASE(29, TestCanonicalization);
|
||||
TESTCASE(30, TestCurrencyByDate);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))
|
||||
|
||||
#define CASE(id,test) case id: \
|
||||
#define CASE(id,test,exec) case id: \
|
||||
name = #test; \
|
||||
if (exec) { \
|
||||
logln(#test "---"); \
|
||||
|
@ -32,8 +32,10 @@
|
|||
|
||||
void NormalizerConformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/) {
|
||||
switch (index) {
|
||||
CASE(0, TestConformance);
|
||||
CASE(1, TestConformance32);
|
||||
CASE(0, TestConformance, exec);
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
CASE(1, TestConformance32, exec);
|
||||
#endif
|
||||
// CASE(2, TestCase6);
|
||||
default: name = ""; break;
|
||||
}
|
||||
|
|
|
@ -1112,20 +1112,28 @@ void RBBIAPITest::runIndexedTest( int32_t index, UBool exec, const char* &name,
|
|||
if (exec) logln((UnicodeString)"TestSuite RuleBasedBreakIterator API ");
|
||||
switch (index) {
|
||||
// case 0: name = "TestConstruction"; if (exec) TestConstruction(); break;
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 0: name = "TestCloneEquals"; if (exec) TestCloneEquals(); break;
|
||||
case 1: name = "TestgetRules"; if (exec) TestgetRules(); break;
|
||||
case 2: name = "TestHashCode"; if (exec) TestHashCode(); break;
|
||||
case 3: name = "TestGetSetAdoptText"; if (exec) TestGetSetAdoptText(); break;
|
||||
case 4: name = "TestIteration"; if (exec) TestIteration(); break;
|
||||
#else
|
||||
case 0: case 1: case 2: case 3: case 4: name = "skip"; break;
|
||||
#endif
|
||||
case 5: name = "TestBuilder"; if (exec) TestBuilder(); break;
|
||||
case 6: name = "TestQuoteGrouping"; if (exec) TestQuoteGrouping(); break;
|
||||
case 7: name = "TestRuleStatus"; if (exec) TestRuleStatus(); break;
|
||||
case 8: name = "TestRuleStatusVec"; if (exec) TestRuleStatusVec(); break;
|
||||
case 9: name = "TestBug2190"; if (exec) TestBug2190(); break;
|
||||
case 10: name = "TestRegistration"; if (exec) TestRegistration(); break;
|
||||
case 11: name = "TestBoilerPlate"; if (exec) TestBoilerPlate(); break;
|
||||
case 7: name = "TestRuleStatusVec"; if (exec) TestRuleStatusVec(); break;
|
||||
case 8: name = "TestBug2190"; if (exec) TestBug2190(); break;
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 9: name = "TestRegistration"; if (exec) TestRegistration(); break;
|
||||
case 10: name = "TestBoilerPlate"; if (exec) TestBoilerPlate(); break;
|
||||
case 11: name = "TestRuleStatus"; if (exec) TestRuleStatus(); break;
|
||||
case 12: name = "TestRoundtripRules"; if (exec) TestRoundtripRules(); break;
|
||||
case 13: name = "TestCreateFromRBBIData"; if (exec) TestCreateFromRBBIData(); break;
|
||||
#else
|
||||
case 9: case 10: case 11: case 12: case 13: name = "skip"; break;
|
||||
#endif
|
||||
|
||||
default: name = ""; break; // needed to end loop
|
||||
}
|
||||
|
|
|
@ -50,16 +50,28 @@ void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, cha
|
|||
if (exec) logln("TestSuite RuleBasedBreakIterator: ");
|
||||
|
||||
switch (index) {
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 0: name = "TestBug4153072";
|
||||
if(exec) TestBug4153072(); break;
|
||||
#else
|
||||
case 0: name = "skip";
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 1: name = "TestJapaneseLineBreak";
|
||||
if(exec) TestJapaneseLineBreak(); break;
|
||||
case 2: name = "TestStatusReturn";
|
||||
if(exec) TestStatusReturn(); break;
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 3: name = "TestUnicodeFiles";
|
||||
if(exec) TestUnicodeFiles(); break;
|
||||
case 4: name = "TestEmptyString";
|
||||
if(exec) TestEmptyString(); break;
|
||||
#else
|
||||
case 3: case 4: name = "skip";
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 5: name = "TestGetAvailableLocales";
|
||||
if(exec) TestGetAvailableLocales(); break;
|
||||
|
@ -67,6 +79,7 @@ void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, cha
|
|||
case 6: name = "TestGetDisplayName";
|
||||
if(exec) TestGetDisplayName(); break;
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 7: name = "TestEndBehaviour";
|
||||
if(exec) TestEndBehaviour(); break;
|
||||
case 8: name = "TestMixedThaiLineBreak";
|
||||
|
@ -85,29 +98,48 @@ void RBBITest::runIndexedTest( int32_t index, UBool exec, const char* &name, cha
|
|||
if(exec) TestSentBreaks(); break;
|
||||
case 15: name = "TestExtended";
|
||||
if(exec) TestExtended(); break;
|
||||
case 16: name = "TestMonkey";
|
||||
#else
|
||||
case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: name = "skip";
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 16:
|
||||
if(exec) {
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_FILE_IO
|
||||
name = "TestMonkey";
|
||||
TestMonkey(params);
|
||||
#else
|
||||
logln("skipping TestMonkey (UCONFIG_NO_REGULAR_EXPRESSIONS)");
|
||||
name = "skip";
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 17: name = "TestBug3818";
|
||||
if(exec) TestBug3818(); break;
|
||||
case 18: name = "TestJapaneseWordBreak";
|
||||
if(exec) TestJapaneseWordBreak(); break;
|
||||
#else
|
||||
case 17: case 18: name = "skip";
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 19: name = "TestDebug";
|
||||
if(exec) TestDebug(); break;
|
||||
case 20: name = "TestTrieDict";
|
||||
if(exec) TestTrieDict(); break;
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
case 21: name = "TestBug5775";
|
||||
if (exec) TestBug5775(); break;
|
||||
case 22: name = "TestThaiBreaks";
|
||||
if (exec) TestThaiBreaks(); break;
|
||||
case 23: name = "TestTailoredBreaks";
|
||||
if (exec) TestTailoredBreaks(); break;
|
||||
#else
|
||||
case 21: case 22: case 23: name = "skip";
|
||||
break;
|
||||
#endif
|
||||
|
||||
default: name = ""; break; //needed to end loop
|
||||
}
|
||||
|
|
|
@ -57,8 +57,13 @@ void RegexTest::runIndexedTest( int32_t index, UBool exec, const char* &name, ch
|
|||
case 3: name = "API_Pattern";
|
||||
if (exec) API_Pattern();
|
||||
break;
|
||||
case 4: name = "Extended";
|
||||
case 4:
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
name = "Extended";
|
||||
if (exec) Extended();
|
||||
#else
|
||||
name = "skip";
|
||||
#endif
|
||||
break;
|
||||
case 5: name = "Errors";
|
||||
if (exec) Errors();
|
||||
|
|
|
@ -183,11 +183,16 @@ void ResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const char*
|
|||
{
|
||||
if (exec) logln("TestSuite ResourceBundleTest: ");
|
||||
switch (index) {
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
case 0: name = "TestResourceBundles"; if (exec) TestResourceBundles(); break;
|
||||
case 1: name = "TestConstruction"; if (exec) TestConstruction(); break;
|
||||
case 2: name = "TestExemplar"; if (exec) TestExemplar(); break;
|
||||
case 3: name = "TestGetSize"; if (exec) TestGetSize(); break;
|
||||
case 4: name = "TestGetLocaleByType"; if (exec) TestGetLocaleByType(); break;
|
||||
case 2: name = "TestGetSize"; if (exec) TestGetSize(); break;
|
||||
case 3: name = "TestGetLocaleByType"; if (exec) TestGetLocaleByType(); break;
|
||||
#else
|
||||
case 0: case 1: case 2: case 3: name = "skip"; break;
|
||||
#endif
|
||||
|
||||
case 4: name = "TestExemplar"; if (exec) TestExemplar(); break;
|
||||
default: name = ""; break; //needed to end loop
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,11 +181,16 @@ void NewResourceBundleTest::runIndexedTest( int32_t index, UBool exec, const cha
|
|||
{
|
||||
if (exec) logln("TestSuite ResourceBundleTest: ");
|
||||
switch (index) {
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
case 0: name = "TestResourceBundles"; if (exec) TestResourceBundles(); break;
|
||||
case 1: name = "TestConstruction"; if (exec) TestConstruction(); break;
|
||||
case 2: name = "TestIteration"; if (exec) TestIteration(); break;
|
||||
case 3: name = "TestOtherAPI"; if(exec) TestOtherAPI(); break;
|
||||
case 4: name = "TestNewTypes"; if(exec) TestNewTypes(); break;
|
||||
#else
|
||||
case 0: case 1: case 2: case 3: case 4: name = "skip"; break;
|
||||
#endif
|
||||
|
||||
case 5: name = "TestGetByFallback"; if(exec) TestGetByFallback(); break;
|
||||
default: name = ""; break; //needed to end loop
|
||||
}
|
||||
|
|
|
@ -114,7 +114,9 @@ void StringSearchTest::runIndexedTest(int32_t index, UBool exec,
|
|||
}
|
||||
|
||||
switch (index) {
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
CASE(0, TestOpenClose)
|
||||
#endif
|
||||
CASE(1, TestInitialization)
|
||||
CASE(2, TestBasic)
|
||||
CASE(3, TestNormExact)
|
||||
|
|
|
@ -143,7 +143,7 @@ const char *SSearchTest::getPath(char buffer[2048], const char *filename) {
|
|||
|
||||
void SSearchTest::searchTest()
|
||||
{
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_FILE_IO
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
char path[PATH_BUFFER_SIZE];
|
||||
const char *testFilePath = getPath(path, "ssearch.xml");
|
||||
|
|
|
@ -35,10 +35,12 @@ StringCaseTest::runIndexedTest(int32_t index, UBool exec, const char *&name, cha
|
|||
if (exec) logln("TestSuite StringCaseTest: ");
|
||||
switch (index) {
|
||||
case 0: name = "TestCaseConversion"; if (exec) TestCaseConversion(); break;
|
||||
case 1:
|
||||
case 1:
|
||||
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
name = "TestCasing";
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
if(exec) TestCasing();
|
||||
#else
|
||||
name = "skip";
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
|
@ -1251,8 +1251,12 @@ void TestIDNA::runIndexedTest( int32_t index, UBool exec, const char* &name, cha
|
|||
case 7: name = "TestRootLabelSeparator"; if(exec) TestRootLabelSeparator(); break;
|
||||
case 8: name = "TestCompareReferenceImpl"; if(exec) TestCompareReferenceImpl(); break;
|
||||
case 9: name = "TestDataFile"; if(exec) TestDataFile(); break;
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
case 10: name = "TestRefIDNA"; if(exec) TestRefIDNA(); break;
|
||||
case 11: name = "TestIDNAMonkeyTest"; if(exec) TestIDNAMonkeyTest(); break;
|
||||
#else
|
||||
case 10: case 11: name = "skip"; break;
|
||||
#endif
|
||||
case 12:
|
||||
{
|
||||
name = "TestConformanceTestVectors";
|
||||
|
|
|
@ -171,7 +171,9 @@ TransliteratorTest::runIndexedTest(int32_t index, UBool exec,
|
|||
TESTCASE(62,TestAnchorMasking);
|
||||
TESTCASE(63,TestDisplayName);
|
||||
TESTCASE(64,TestSpecialCases);
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
TESTCASE(65,TestIncrementalProgress);
|
||||
#endif
|
||||
TESTCASE(66,TestSurrogateCasing);
|
||||
TESTCASE(67,TestFunction);
|
||||
TESTCASE(68,TestInvalidBackRef);
|
||||
|
@ -237,16 +239,20 @@ void TransliteratorTest::TestInstantiation() {
|
|||
name.truncate(0);
|
||||
Transliterator::getDisplayName(id, name);
|
||||
if (t == 0) {
|
||||
errln(UnicodeString("FAIL: Couldn't create ") + id +
|
||||
/*", parse error " + parseError.code +*/
|
||||
", line " + parseError.line +
|
||||
", offset " + parseError.offset +
|
||||
", pre-context " + prettify(parseError.preContext, TRUE) +
|
||||
", post-context " +prettify(parseError.postContext,TRUE) +
|
||||
", Error: " + u_errorName(status));
|
||||
// When createInstance fails, it deletes the failing
|
||||
// entry from the available ID list. We detect this
|
||||
// here by looking for a change in countAvailableIDs.
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
// If UCONFIG_NO_BREAK_ITERATION is on, then only Thai should fail.
|
||||
if (id.compare((UnicodeString)"Thai-Latin") != 0)
|
||||
#endif
|
||||
errln(UnicodeString("FAIL: Couldn't create ") + id +
|
||||
/*", parse error " + parseError.code +*/
|
||||
", line " + parseError.line +
|
||||
", offset " + parseError.offset +
|
||||
", pre-context " + prettify(parseError.preContext, TRUE) +
|
||||
", post-context " +prettify(parseError.postContext,TRUE) +
|
||||
", Error: " + u_errorName(status));
|
||||
// When createInstance fails, it deletes the failing
|
||||
// entry from the available ID list. We detect this
|
||||
// here by looking for a change in countAvailableIDs.
|
||||
int32_t nn = Transliterator::countAvailableIDs();
|
||||
if (nn == (n - 1)) {
|
||||
n = nn;
|
||||
|
@ -3566,7 +3572,12 @@ void TransliteratorTest::TestIncrementalProgress(void) {
|
|||
_trans(*t, test, rev);
|
||||
Transliterator *inv = t->createInverse(status);
|
||||
if (U_FAILURE(status)) {
|
||||
errln((UnicodeString)"FAIL: Could not create inverse of " + id);
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
// If UCONFIG_NO_BREAK_ITERATION is on, then only Thai should fail.
|
||||
if (id.compare((UnicodeString)"Latin-Thai/") != 0)
|
||||
#endif
|
||||
errln((UnicodeString)"FAIL: Could not create inverse of " + id);
|
||||
|
||||
delete t;
|
||||
delete inv;
|
||||
continue;
|
||||
|
@ -4576,6 +4587,7 @@ void TransliteratorTest::TestHalfwidthFullwidth(void) {
|
|||
* For now, test just confirms that C++ and Java give identical results.
|
||||
*/
|
||||
void TransliteratorTest::TestThai(void) {
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
UParseError parseError;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
Transliterator* tr = Transliterator::createInstance("Any-Latin", UTRANS_FORWARD, parseError, status);
|
||||
|
@ -4649,6 +4661,7 @@ void TransliteratorTest::TestThai(void) {
|
|||
expect(*tr, xlitText, expectedText);
|
||||
|
||||
delete tr;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
|||
TESTCLASS(14, LotusCollationKoreanTest);
|
||||
TESTCLASS(15, StringSearchTest);
|
||||
TESTCLASS(16, ContractionTableTest);
|
||||
#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
TESTCLASS(17, DataDrivenCollatorTest);
|
||||
#endif
|
||||
TESTCLASS(18, UCAConformanceTest);
|
||||
TESTCLASS(19, CollationServiceTest);
|
||||
TESTCLASS(20, CollationFinnishTest); // removed by weiv - we have changed Finnish collation
|
||||
|
|
|
@ -281,7 +281,7 @@ void UObjectTest::testIDs()
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
|
||||
/* TESTCLASSID_ABSTRACT(BreakIterator); No staticID! */
|
||||
TESTCLASSID_FACTORY(RuleBasedBreakIterator, BreakIterator::createLineInstance("mt",status));
|
||||
//TESTCLASSID_FACTORY(DictionaryBasedBreakIterator, BreakIterator::createLineInstance("th",status));
|
||||
|
|
|
@ -1215,9 +1215,11 @@ void UnicodeSetTest::TestCloseOver() {
|
|||
|
||||
CASE, "[{\\u1f7c\\u03b9}]", "[\\u1ff2{\\u1f7c\\u03b9}]", // last in sorted table
|
||||
|
||||
#if !UCONFIG_NO_FILE_IO
|
||||
CASE_MAPPINGS,
|
||||
"[aq\\u00DF{Bc}{bC}{Fi}]",
|
||||
"[aAqQ\\u00DF{ss}{Ss}{SS}{Bc}{BC}{bC}{bc}{FI}{Fi}{fi}]",
|
||||
#endif
|
||||
|
||||
CASE_MAPPINGS,
|
||||
"[\\u01F1]", // 'DZ'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2008, International Business Machines
|
||||
* Copyright (C) 2002-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* file name: iotest.cpp
|
||||
|
@ -184,7 +184,7 @@ uto64(const UChar *buffer)
|
|||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV DataDrivenPrintf(void)
|
||||
{
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_FILE_IO
|
||||
UErrorCode errorCode;
|
||||
TestDataModule *dataModule;
|
||||
TestData *testData;
|
||||
|
@ -352,7 +352,7 @@ U_CDECL_END
|
|||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV DataDrivenScanf(void)
|
||||
{
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_FILE_IO
|
||||
UErrorCode errorCode;
|
||||
TestDataModule *dataModule;
|
||||
TestData *testData;
|
||||
|
@ -554,7 +554,7 @@ U_CDECL_END
|
|||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV DataDrivenPrintfPrecision(void)
|
||||
{
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_FILE_IO
|
||||
UErrorCode errorCode;
|
||||
TestDataModule *dataModule;
|
||||
TestData *testData;
|
||||
|
@ -683,7 +683,7 @@ static void addAllTests(TestNode** root) {
|
|||
addStringTest(root);
|
||||
addTranslitTest(root);
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_LEGACY_CONVERSION
|
||||
addTest(root, &DataDrivenPrintf, "datadriv/DataDrivenPrintf");
|
||||
addTest(root, &DataDrivenPrintfPrecision, "datadriv/DataDrivenPrintfPrecision");
|
||||
addTest(root, &DataDrivenScanf, "datadriv/DataDrivenScanf");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines
|
||||
* Copyright (C) 2002-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ void usageAndDie(int retCode) {
|
|||
}
|
||||
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
#if UCONFIG_NO_BREAK_ITERATION || UCONFIG_NO_FILE_IO
|
||||
|
||||
/* dummy UDataInfo cf. udata.h */
|
||||
static UDataInfo dummyDataInfo = {
|
||||
|
@ -159,13 +159,6 @@ int main(int argc, char **argv) {
|
|||
u_setDataDirectory(options[5].value);
|
||||
}
|
||||
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
/* Combine the directory with the file name */
|
||||
|
@ -176,13 +169,13 @@ int main(int argc, char **argv) {
|
|||
copyright = U_COPYRIGHT_STRING;
|
||||
}
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
#if UCONFIG_NO_BREAK_ITERATION || UCONFIG_NO_FILE_IO
|
||||
|
||||
UNewDataMemory *pData;
|
||||
char msg[1024];
|
||||
|
||||
/* write message with just the name */
|
||||
sprintf(msg, "genbrk writes dummy %s because of UCONFIG_NO_BREAK_ITERATION, see uconfig.h", outFileName);
|
||||
sprintf(msg, "genbrk writes dummy %s because of UCONFIG_NO_BREAK_ITERATION and/or UCONFIG_NO_FILE_IO, see uconfig.h", outFileName);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
|
||||
/* write the dummy data file */
|
||||
|
@ -192,6 +185,14 @@ int main(int argc, char **argv) {
|
|||
return (int)status;
|
||||
|
||||
#else
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
//
|
||||
// Read in the rule source file
|
||||
|
|
|
@ -74,7 +74,7 @@ void usageAndDie(int retCode) {
|
|||
}
|
||||
|
||||
|
||||
#if UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if UCONFIG_NO_REGULAR_EXPRESSIONS || UCONFIG_NO_NORMALIZATION || UCONFIG_NO_FILE_IO
|
||||
|
||||
/* dummy UDataInfo cf. udata.h */
|
||||
static UDataInfo dummyDataInfo = {
|
||||
|
@ -164,13 +164,6 @@ int main(int argc, char **argv) {
|
|||
u_setDataDirectory(options[6].value);
|
||||
}
|
||||
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
/* Combine the directory with the file name */
|
||||
|
@ -181,7 +174,7 @@ int main(int argc, char **argv) {
|
|||
copyright = U_COPYRIGHT_STRING;
|
||||
}
|
||||
|
||||
#if UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
#if UCONFIG_NO_REGULAR_EXPRESSIONS || UCONFIG_NO_NORMALIZATION || UCONFIG_NO_FILE_IO
|
||||
// spoof detection data file parsing is dependent on regular expressions.
|
||||
// TODO: have the tool return an error status. Requires fixing the ICU data build
|
||||
// so that it doesn't abort entirely on that error.
|
||||
|
@ -190,7 +183,7 @@ int main(int argc, char **argv) {
|
|||
char msg[1024];
|
||||
|
||||
/* write message with just the name */
|
||||
sprintf(msg, "gencfu writes dummy %s because of UCONFIG_NO_REGULAR_EXPRESSIONS, see uconfig.h", outFileName);
|
||||
sprintf(msg, "gencfu writes dummy %s because of UCONFIG_NO_REGULAR_EXPRESSIONS and/or UCONFIG_NO_NORMALIZATION and/or UCONFIG_NO_FILE_IO, see uconfig.h", outFileName);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
|
||||
/* write the dummy data file */
|
||||
|
@ -200,6 +193,14 @@ int main(int argc, char **argv) {
|
|||
return (int)status;
|
||||
|
||||
#else
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
// Read in the confusables source file
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines
|
||||
* Copyright (C) 2002-2009, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
*
|
||||
|
@ -74,7 +74,7 @@ void usageAndDie(int retCode) {
|
|||
}
|
||||
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
#if UCONFIG_NO_BREAK_ITERATION || UCONFIG_NO_FILE_IO
|
||||
|
||||
/* dummy UDataInfo cf. udata.h */
|
||||
static UDataInfo dummyDataInfo = {
|
||||
|
@ -157,13 +157,6 @@ int main(int argc, char **argv) {
|
|||
u_setDataDirectory(options[4].value);
|
||||
}
|
||||
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
/* Combine the directory with the file name */
|
||||
|
@ -174,13 +167,13 @@ int main(int argc, char **argv) {
|
|||
copyright = U_COPYRIGHT_STRING;
|
||||
}
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
#if UCONFIG_NO_BREAK_ITERATION || UCONFIG_NO_FILE_IO
|
||||
|
||||
UNewDataMemory *pData;
|
||||
char msg[1024];
|
||||
|
||||
/* write message with just the name */
|
||||
sprintf(msg, "genctd writes dummy %s because of UCONFIG_NO_BREAK_ITERATION, see uconfig.h", outFileName);
|
||||
sprintf(msg, "genctd writes dummy %s because of UCONFIG_NO_BREAK_ITERATION and/or UCONFIG_NO_FILE_IO, see uconfig.h", outFileName);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
|
||||
/* write the dummy data file */
|
||||
|
@ -190,6 +183,14 @@ int main(int argc, char **argv) {
|
|||
return (int)status;
|
||||
|
||||
#else
|
||||
/* Initialize ICU */
|
||||
u_init(&status);
|
||||
if (U_FAILURE(status)) {
|
||||
fprintf(stderr, "%s: can not initialize ICU. status = %s\n",
|
||||
argv[0], u_errorName(status));
|
||||
exit(1);
|
||||
}
|
||||
status = U_ZERO_ERROR;
|
||||
|
||||
//
|
||||
// Read in the dictionary source file
|
||||
|
|
|
@ -712,8 +712,8 @@ addCollation(struct SResource *result, uint32_t startline, UErrorCode *status)
|
|||
}
|
||||
else if (uprv_strcmp(subtag, "Sequence") == 0)
|
||||
{
|
||||
#if UCONFIG_NO_COLLATION
|
||||
warning(line, "Not building collation elements because of UCONFIG_NO_COLLATION, see uconfig.h");
|
||||
#if UCONFIG_NO_COLLATION || UCONFIG_NO_FILE_IO
|
||||
warning(line, "Not building collation elements because of UCONFIG_NO_COLLATION and/or UCONFIG_NO_FILE_IO, see uconfig.h");
|
||||
#else
|
||||
if(gMakeBinaryCollation) {
|
||||
UErrorCode intStatus = U_ZERO_ERROR;
|
||||
|
|
|
@ -196,6 +196,7 @@ outputJavaStuff(const char* progname, const char *outputDir) {
|
|||
fprintf(out,
|
||||
" ");
|
||||
switch(t) {
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
case UDBG_UCalendarDateFields:
|
||||
case UDBG_UCalendarMonths:
|
||||
/* Temporary workaround for IS_LEAP_MOTH #6051 */
|
||||
|
@ -204,6 +205,7 @@ outputJavaStuff(const char* progname, const char *outputDir) {
|
|||
} else
|
||||
fprintf(out, "com.ibm.icu.util.Calendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
|
||||
break;
|
||||
#endif
|
||||
case UDBG_UDebugEnumType:
|
||||
default:
|
||||
fprintf(out,"%d, /* %s */", i, udbg_enumName((UDebugEnumType)t,i));
|
||||
|
|
|
@ -352,7 +352,12 @@ readFile(const char *path, const char *name, int32_t &length, char &type) {
|
|||
if(typeEnum<0 || U_FAILURE(errorCode)) {
|
||||
fprintf(stderr, "icupkg: not an ICU data file: \"%s\"\n", filename);
|
||||
free(data);
|
||||
#if !UCONFIG_NO_LEGACY_CONVERSION
|
||||
exit(U_INVALID_FORMAT_ERROR);
|
||||
#else
|
||||
fprintf(stderr, "U_INVALID_FORMAT_ERROR occurred but UCONFIG_NO_LEGACY_CONVERSION is on so this is expected.\n");
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
type=makeTypeLetter(typeEnum);
|
||||
|
||||
|
|
|
@ -630,9 +630,9 @@ static const struct {
|
|||
#endif
|
||||
{ { 0x70, 0x6e, 0x61, 0x6d }, upname_swap }, /* dataFormat="pnam" */
|
||||
{ { 0x75, 0x6e, 0x61, 0x6d }, uchar_swapNames }, /* dataFormat="unam" */
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
{ { 0x43, 0x66, 0x75, 0x20 }, uspoof_swap }, /* dataFormat="Cfu " */
|
||||
|
||||
#endif
|
||||
{ { 0x54, 0x65, 0x73, 0x74 }, test_swap } /* dataFormat="Test" */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue