diff --git a/icu4c/source/common/caniter.cpp b/icu4c/source/common/caniter.cpp index 85e45bdbe8..28fb84c14e 100644 --- a/icu4c/source/common/caniter.cpp +++ b/icu4c/source/common/caniter.cpp @@ -1,10 +1,14 @@ /* ***************************************************************************** - * Copyright (C) 1996-2002, International Business Machines Corporation and * + * Copyright (C) 1996-2003, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/uset.h" #include "unicode/ustring.h" #include "hash.h" @@ -687,3 +691,5 @@ Hashtable *CanonicalIterator::extract(UChar32 comp, const UChar *segment, int32_ } U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/common/normlzr.cpp b/icu4c/source/common/normlzr.cpp index 147b4c0dca..f9cf165a8f 100644 --- a/icu4c/source/common/normlzr.cpp +++ b/icu4c/source/common/normlzr.cpp @@ -1,12 +1,15 @@ /* ************************************************************************* * COPYRIGHT: - * Copyright (c) 1996-2001, International Business Machines Corporation and + * Copyright (c) 1996-2003, International Business Machines Corporation and * others. All Rights Reserved. ************************************************************************* */ #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/unistr.h" #include "unicode/chariter.h" #include "unicode/schriter.h" @@ -604,3 +607,5 @@ Normalizer::previousNormalize() { } U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/common/unicode/caniter.h b/icu4c/source/common/unicode/caniter.h index 4bd457e6c8..a06d4a8eab 100644 --- a/icu4c/source/common/unicode/caniter.h +++ b/icu4c/source/common/unicode/caniter.h @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1996-2002, International Business Machines Corporation and * + * Copyright (C) 1996-2003, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -9,6 +9,9 @@ #define CANITER_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/uobject.h" #include "unicode/unistr.h" @@ -200,4 +203,7 @@ CanonicalIterator::getDynamicClassID() const { return CanonicalIterator::getStaticClassID(); } U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + #endif diff --git a/icu4c/source/common/unicode/normlzr.h b/icu4c/source/common/unicode/normlzr.h index 1ded734c5d..2d9d28cf7a 100644 --- a/icu4c/source/common/unicode/normlzr.h +++ b/icu4c/source/common/unicode/normlzr.h @@ -10,6 +10,9 @@ #define NORMLZR_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/uobject.h" #include "unicode/unistr.h" #include "unicode/chariter.h" @@ -807,4 +810,7 @@ Normalizer::compare(const UnicodeString &s1, const UnicodeString &s2, } U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + #endif // NORMLZR_H diff --git a/icu4c/source/common/unicode/uconfig.h b/icu4c/source/common/unicode/uconfig.h index 5cdb1d8054..b951101bce 100644 --- a/icu4c/source/common/unicode/uconfig.h +++ b/icu4c/source/common/unicode/uconfig.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002, International Business Machines +* Copyright (C) 2002-2003, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: uconfig.h @@ -45,6 +45,7 @@ #if UCONFIG_ONLY_COLLATION /* common library */ # define UCONFIG_NO_BREAK_ITERATION 1 +# define UCONFIG_NO_IDNA 1 /* i18n library */ # if UCONFIG_NO_COLLATION @@ -73,6 +74,28 @@ # define UCONFIG_NO_LEGACY_CONVERSION 0 #endif +/** + * \def UCONFIG_NO_NORMALIZATION + * This switch turns off normalization. + * It implies turning off several other services as well, for example + * collation and IDNA. + * + * @draft ICU 2.6 + */ +#ifndef UCONFIG_NO_NORMALIZATION +# define UCONFIG_NO_NORMALIZATION 0 +#elif UCONFIG_NO_NORMALIZATION + /* common library */ +# define UCONFIG_NO_IDNA 1 + + /* i18n library */ +# if UCONFIG_ONLY_COLLATION +# error Contradictory collation switches in uconfig.h. +# endif +# define UCONFIG_NO_COLLATION 1 +# define UCONFIG_NO_TRANSLITERATION 1 +#endif + /** * \def UCONFIG_NO_BREAK_ITERATION * This switch turns off break iteration. @@ -83,6 +106,16 @@ # define UCONFIG_NO_BREAK_ITERATION 0 #endif +/** + * \def UCONFIG_NO_IDNA + * This switch turns off IDNA. + * + * @draft ICU 2.6 + */ +#ifndef UCONFIG_NO_IDNA +# define UCONFIG_NO_IDNA 0 +#endif + /* i18n library switches ---------------------------------------------------- */ /** diff --git a/icu4c/source/test/cintltst/cnormtst.c b/icu4c/source/test/cintltst/cnormtst.c index a182e31387..5250932cb2 100644 --- a/icu4c/source/test/cintltst/cnormtst.c +++ b/icu4c/source/test/cintltst/cnormtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2003, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -15,12 +15,21 @@ *********************************************************************************/ /*tests for u_normalization*/ #include "unicode/utypes.h" +#include "cintltst.h" + +#if UCONFIG_NO_NORMALIZATION + +void addNormTest(TestNode** root) { + /* no normalization - nothing to do */ +} + +#else + #include #include #include "unicode/uchar.h" #include "unicode/ustring.h" #include "unicode/unorm.h" -#include "cintltst.h" #include "cnormtst.h" #define ARRAY_LENGTH(array) (sizeof (array) / sizeof (*array)) @@ -101,8 +110,6 @@ const static char* compatTests[][3] = { }; -void addNormTest(TestNode** root); - void addNormTest(TestNode** root) { addTest(root, &TestAPI, "tscoll/cnormtst/TestAPI"); @@ -1367,3 +1374,5 @@ TestFCNFKCClosure(void) { log_err("u_getFC_NFKC_Closure(U_FAILURE) is wrong (%s)\n", u_errorName(errorCode)); } } + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/test/cintltst/cucdtst.c b/icu4c/source/test/cintltst/cucdtst.c index e3a4bffd94..1d6d3a6b6f 100644 --- a/icu4c/source/test/cintltst/cucdtst.c +++ b/icu4c/source/test/cintltst/cucdtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2003, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -960,9 +960,11 @@ unicodeDataLineFn(void *context, log_err("error in UnicodeData.txt: combining class %lu out of range\n", value); return; } +#if !UCONFIG_NO_NORMALIZATION if(value!=u_getCombiningClass(c) || value!=(uint32_t)u_getIntPropertyValue(c, UCHAR_CANONICAL_COMBINING_CLASS)) { log_err("error: u_getCombiningClass(U+%04lx)==%hu instead of %lu\n", c, u_getCombiningClass(c), value); } +#endif /* get BiDi category, field 4 */ *fields[4][1]=0; @@ -2240,9 +2242,11 @@ TestAdditionalProperties() { { 0x0e46, UCHAR_EXTENDER, TRUE }, { 0x0020, UCHAR_EXTENDER, FALSE }, +#if !UCONFIG_NO_NORMALIZATION { 0xfb1d, UCHAR_FULL_COMPOSITION_EXCLUSION, TRUE }, { 0x1d15f, UCHAR_FULL_COMPOSITION_EXCLUSION, TRUE }, { 0xfb1e, UCHAR_FULL_COMPOSITION_EXCLUSION, FALSE }, +#endif { 0x0044, UCHAR_HEX_DIGIT, TRUE }, { 0xff46, UCHAR_HEX_DIGIT, TRUE }, @@ -2833,12 +2837,16 @@ _setAddSerialized(USet *set, const USerializedSet *sset) { /* various tests for consistency of UCD data and API behavior */ static void TestConsistency() { +#if !UCONFIG_NO_NORMALIZATION UChar buffer16[300]; +#endif char buffer[300]; USet *set1, *set2, *set3, *set4; UErrorCode errorCode; +#if !UCONFIG_NO_NORMALIZATION USerializedSet sset; +#endif UChar32 start, end; int32_t i, length; @@ -2938,6 +2946,8 @@ TestConsistency() { } uset_close(set1); +#if !UCONFIG_NO_NORMALIZATION + /* * Test for an example that unorm_getCanonStartSet() delivers * all characters that compose from the input one, @@ -2965,4 +2975,6 @@ TestConsistency() { TRUE); uset_close(set1); uset_close(set2); + +#endif } diff --git a/icu4c/source/test/intltest/canittst.cpp b/icu4c/source/test/intltest/canittst.cpp index ad930a92e7..8a38d85836 100644 --- a/icu4c/source/test/intltest/canittst.cpp +++ b/icu4c/source/test/intltest/canittst.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002, International Business Machines Corporation and + * Copyright (c) 2003, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** * @@ -8,6 +8,9 @@ * @author Vladimir Weinstein */ +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION #include "intltest.h" #include "cstring.h" @@ -306,4 +309,4 @@ void CanonicalIteratorTest::TestAPI() { } } - +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/test/intltest/canittst.h b/icu4c/source/test/intltest/canittst.h index 599f335d24..a908b4b5cf 100644 --- a/icu4c/source/test/intltest/canittst.h +++ b/icu4c/source/test/intltest/canittst.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002, International Business Machines Corporation and + * Copyright (c) 2002-2003, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** * @@ -17,6 +17,9 @@ #include "unicode/utypes.h" +#if !UCONFIG_NO_NORMALIZATION + + U_NAMESPACE_BEGIN class Transliterator; @@ -50,4 +53,6 @@ private: UnicodeString getReadable(const UnicodeString &obj); }; +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + #endif // _CANITTST diff --git a/icu4c/source/test/intltest/idnaref.cpp b/icu4c/source/test/intltest/idnaref.cpp index bd0aca93d5..cb6dd55b70 100644 --- a/icu4c/source/test/intltest/idnaref.cpp +++ b/icu4c/source/test/intltest/idnaref.cpp @@ -1,11 +1,11 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* - * file name: strprep.cpp + * file name: idnaref.cpp * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -13,6 +13,11 @@ * created on: 2003feb1 * created by: Ram Viswanadha */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "idnaref.h" #include "strprep.h" #include "punyref.h" @@ -968,3 +973,4 @@ CLEANUP: return result; } +#endif /* #if !UCONFIG_NO_IDNA */ diff --git a/icu4c/source/test/intltest/idnaref.h b/icu4c/source/test/intltest/idnaref.h index 558e5ce93b..07654783e4 100644 --- a/icu4c/source/test/intltest/idnaref.h +++ b/icu4c/source/test/intltest/idnaref.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,6 +18,9 @@ #define __IDNAREF_H__ #include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "unicode/parseerr.h" #define IDNAREF_DEFAULT 0x0000 @@ -220,7 +223,6 @@ idnaref_compare( const UChar *s1, int32_t length1, int32_t options, UErrorCode* status); - - +#endif /* #if !UCONFIG_NO_IDNA */ #endif diff --git a/icu4c/source/test/intltest/itmajor.cpp b/icu4c/source/test/intltest/itmajor.cpp index 2f40e07b11..bf00b86881 100644 --- a/icu4c/source/test/intltest/itmajor.cpp +++ b/icu4c/source/test/intltest/itmajor.cpp @@ -52,11 +52,13 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam break; case 1: name = "normalize"; +#if !UCONFIG_NO_NORMALIZATION if (exec) { logln("TestSuite Normalize---"); logln(); IntlTestNormalize test; callTest( test, par ); } +#endif break; case 2: name = "collate"; @@ -137,11 +139,13 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam #endif break; case 10: name = "idna"; +#if !UCONFIG_NO_IDNA if(exec){ logln("TestSuite IDNA----"); logln(); TestIDNA test; callTest(test,par); } +#endif break; default: name = ""; break; } @@ -150,6 +154,9 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam void IntlTestNormalize::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) { if(exec) logln("TestSuite Normalize:"); +#if UCONFIG_NO_NORMALIZATION + name=""; +#else switch (index) { CASE_SUITE(0, BasicNormalizerTest); CASE_SUITE(1, NormalizerConformanceTest); // this takes a long time @@ -158,4 +165,5 @@ void IntlTestNormalize::runIndexedTest( int32_t index, UBool exec, const char* & name=""; break; } +#endif } diff --git a/icu4c/source/test/intltest/normconf.cpp b/icu4c/source/test/intltest/normconf.cpp index f553d039c4..189160a949 100644 --- a/icu4c/source/test/intltest/normconf.cpp +++ b/icu4c/source/test/intltest/normconf.cpp @@ -1,11 +1,14 @@ /* ************************************************************************ -* Copyright (c) 1997-2002, International Business Machines +* Copyright (c) 1997-2003, International Business Machines * Corporation and others. All Rights Reserved. ************************************************************************ */ #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/uchar.h" #include "unicode/normlzr.h" #include "unicode/uniset.h" @@ -556,3 +559,5 @@ void NormalizerConformanceTest::_testOneLine(const char *line) { checkConformance(fields, line, 0); } } + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/test/intltest/normconf.h b/icu4c/source/test/intltest/normconf.h index 4aa64d9cbf..d88cfc803f 100644 --- a/icu4c/source/test/intltest/normconf.h +++ b/icu4c/source/test/intltest/normconf.h @@ -1,6 +1,6 @@ /* ************************************************************************ -* Copyright (c) 1997-2001, International Business Machines +* Copyright (c) 1997-2003, International Business Machines * Corporation and others. All Rights Reserved. ************************************************************************ */ @@ -9,6 +9,9 @@ #define _NORMCONF #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/normlzr.h" #include "intltest.h" @@ -96,4 +99,6 @@ class NormalizerConformanceTest : public IntlTest { void compare(const UnicodeString& s1,const UnicodeString& s2); }; +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + #endif diff --git a/icu4c/source/test/intltest/nptrans.cpp b/icu4c/source/test/intltest/nptrans.cpp index 378adcea52..4ec67707ae 100644 --- a/icu4c/source/test/intltest/nptrans.cpp +++ b/icu4c/source/test/intltest/nptrans.cpp @@ -1,11 +1,11 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* - * file name: nameprep.h + * file name: nptrans.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -14,6 +14,10 @@ * created by: Ram Viswanadha */ +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "nptrans.h" #include "unicode/resbund.h" #include "unicode/uniset.h" @@ -272,4 +276,4 @@ UBool NamePrepTransform::isLabelSeparator(UChar32 ch, UErrorCode& status){ return labelSeparatorSet.contains(ch); } - +#endif /* #if !UCONFIG_NO_IDNA */ diff --git a/icu4c/source/test/intltest/nptrans.h b/icu4c/source/test/intltest/nptrans.h index 06aaa17680..06b45db12b 100644 --- a/icu4c/source/test/intltest/nptrans.h +++ b/icu4c/source/test/intltest/nptrans.h @@ -1,11 +1,11 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* - * file name: nameprep.h + * file name: nptrans.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -18,6 +18,9 @@ #define NPTRANS_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "strprep.h" #include "unicode/uniset.h" #include "unicode/ures.h" @@ -141,6 +144,9 @@ inline UBool NamePrepTransform::isLDHChar(UChar32 ch){ } return FALSE; } + +#endif /* #if !UCONFIG_NO_IDNA */ + #endif /* diff --git a/icu4c/source/test/intltest/punyref.c b/icu4c/source/test/intltest/punyref.c index 0c09ecae53..b7518c5ca6 100644 --- a/icu4c/source/test/intltest/punyref.c +++ b/icu4c/source/test/intltest/punyref.c @@ -9,6 +9,11 @@ http://www.nicemice.net/amc/ /* Implementation (would normally go in its own .c file): */ #include + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "punyref.h" /*** Bootstring parameters for Punycode ***/ @@ -266,4 +271,4 @@ enum punycode_status punycode_decode( U_CDECL_END - +#endif /* #if !UCONFIG_NO_IDNA */ diff --git a/icu4c/source/test/intltest/punyref.h b/icu4c/source/test/intltest/punyref.h index 4f80b36ccd..7e22488bcc 100644 --- a/icu4c/source/test/intltest/punyref.h +++ b/icu4c/source/test/intltest/punyref.h @@ -17,6 +17,8 @@ Punycode (draft-ietf-idn-punycode-03). #include #include "unicode/utypes.h" +#if !UCONFIG_NO_IDNA + enum punycode_status { punycode_success, punycode_bad_input, /* Input is invalid. */ @@ -89,5 +91,7 @@ enum punycode_status punycode_decode( /* decoder will never need to write an output_length greater than */ /* input_length, because of how the encoding is defined. */ U_CDECL_END -#endif +#endif /* #if !UCONFIG_NO_IDNA */ + +#endif diff --git a/icu4c/source/test/intltest/strcase.cpp b/icu4c/source/test/intltest/strcase.cpp index af148f6b50..0b33b28899 100644 --- a/icu4c/source/test/intltest/strcase.cpp +++ b/icu4c/source/test/intltest/strcase.cpp @@ -217,6 +217,9 @@ StringCaseTest::TestCaseConversion() } } +#if !UCONFIG_NO_NORMALIZATION + // some context-sensitive casing depends on normalization data being present + // Unicode 3.1.1 SpecialCasing tests { UnicodeString t; @@ -292,6 +295,8 @@ StringCaseTest::TestCaseConversion() } } +#endif + // test case folding { UnicodeString diff --git a/icu4c/source/test/intltest/testidna.cpp b/icu4c/source/test/intltest/testidna.cpp index d0aeee6d98..0486db5f0d 100644 --- a/icu4c/source/test/intltest/testidna.cpp +++ b/icu4c/source/test/intltest/testidna.cpp @@ -1,11 +1,11 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* - * file name: strprep.cpp + * file name: testidna.cpp * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -13,6 +13,11 @@ * created on: 2003feb1 * created by: Ram Viswanadha */ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "unicode/uidna.h" #include #include @@ -1408,4 +1413,4 @@ void TestIDNA::TestDataFile(){ testData(*this); } - +#endif /* #if !UCONFIG_NO_IDNA */ diff --git a/icu4c/source/test/intltest/testidna.h b/icu4c/source/test/intltest/testidna.h index 63f191e8e3..1e7f55b7f9 100644 --- a/icu4c/source/test/intltest/testidna.h +++ b/icu4c/source/test/intltest/testidna.h @@ -1,11 +1,11 @@ /* ******************************************************************************* * - * Copyright (C) 2002, International Business Machines + * Copyright (C) 2003, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* - * file name: strprep.cpp + * file name: testidna.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 @@ -17,6 +17,10 @@ #ifndef TESTIDNA_H #define TESTIDNA_H +#include "unicode/utypes.h" + +#if !UCONFIG_NO_IDNA + #include "sprpimpl.h" #include "intltest.h" #include "unicode/parseerr.h" @@ -106,4 +110,6 @@ private: // test the TRIE data structure int testData(TestIDNA& test); +#endif /* #if !UCONFIG_NO_IDNA */ + #endif diff --git a/icu4c/source/test/intltest/tstnorm.cpp b/icu4c/source/test/intltest/tstnorm.cpp index 7e627b6b40..b07b005671 100644 --- a/icu4c/source/test/intltest/tstnorm.cpp +++ b/icu4c/source/test/intltest/tstnorm.cpp @@ -1,10 +1,13 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2003, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ #include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/uchar.h" #include "unicode/normlzr.h" #include "unicode/uniset.h" @@ -1832,3 +1835,5 @@ BasicNormalizerTest::TestSkippable() { } } } + +#endif /* #if !UCONFIG_NO_NORMALIZATION */ diff --git a/icu4c/source/test/intltest/tstnorm.h b/icu4c/source/test/intltest/tstnorm.h index 0dfbbf9152..5b4af97397 100644 --- a/icu4c/source/test/intltest/tstnorm.h +++ b/icu4c/source/test/intltest/tstnorm.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2001, International Business Machines Corporation and + * Copyright (c) 1997-2003, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -11,6 +11,10 @@ #ifndef _TSTNORM #define _TSTNORM +#include "unicode/utypes.h" + +#if !UCONFIG_NO_NORMALIZATION + #include "unicode/normlzr.h" #include "intltest.h" @@ -66,4 +70,6 @@ private: }; +#endif /* #if !UCONFIG_NO_NORMALIZATION */ + #endif // _TSTNORM diff --git a/icu4c/source/test/intltest/uobjtest.cpp b/icu4c/source/test/intltest/uobjtest.cpp index 71f3ae2195..87fb1c1227 100644 --- a/icu4c/source/test/intltest/uobjtest.cpp +++ b/icu4c/source/test/intltest/uobjtest.cpp @@ -214,7 +214,9 @@ void UObjectTest::testIDs() //TESTCLASSID_DEFAULT(AnonymousStringFactory); +#if !UCONFIG_NO_NORMALIZATION TESTCLASSID_FACTORY(CanonicalIterator, new CanonicalIterator(UnicodeString("abc"), status)); +#endif //TESTCLASSID_DEFAULT(CollationElementIterator); #if !UCONFIG_NO_COLLATION TESTCLASSID_DEFAULT(CollationKey);