From: Norbert Runge Date: Tue, 12 Sep 2017 20:29:14 +0000 (+0000) Subject: ICU-13069 enables code to compile when UCONFIG_NO_NORMALIZATION is set to 1; all... X-Git-Tag: release-60-rc~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52417e22219bc3f6135ddb6b55cfcc65ba9b50f5;p=icu ICU-13069 enables code to compile when UCONFIG_NO_NORMALIZATION is set to 1; all unit tests pass. X-SVN-Rev: 40388 --- diff --git a/icu4c/source/common/rbbirb.h b/icu4c/source/common/rbbirb.h index d58a1361562..f00f58e5dff 100644 --- a/icu4c/source/common/rbbirb.h +++ b/icu4c/source/common/rbbirb.h @@ -15,6 +15,9 @@ #define RBBIRB_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_BREAK_ITERATION + #include "unicode/uobject.h" #include "unicode/rbbi.h" #include "unicode/uniset.h" @@ -207,6 +210,9 @@ struct RBBISetTableEl { #endif U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + #endif diff --git a/icu4c/source/common/rbbisetb.h b/icu4c/source/common/rbbisetb.h index 5d1f011097e..49ecb0024a5 100644 --- a/icu4c/source/common/rbbisetb.h +++ b/icu4c/source/common/rbbisetb.h @@ -13,6 +13,9 @@ #define RBBISETB_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_BREAK_ITERATION + #include "unicode/uobject.h" #include "rbbirb.h" #include "utrie2.h" @@ -128,4 +131,7 @@ private: U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_BREAK_ITERATION */ + #endif diff --git a/icu4c/source/i18n/uspoof_conf.h b/icu4c/source/i18n/uspoof_conf.h index 4a4f65967dd..cfa80e7ca76 100644 --- a/icu4c/source/i18n/uspoof_conf.h +++ b/icu4c/source/i18n/uspoof_conf.h @@ -21,6 +21,8 @@ #ifndef __USPOOF_BUILDCONF_H__ #define __USPOOF_BUILDCONF_H__ +#include "unicode/utypes.h" + #if !UCONFIG_NO_NORMALIZATION #if !UCONFIG_NO_REGULAR_EXPRESSIONS diff --git a/icu4c/source/test/intltest/strcase.cpp b/icu4c/source/test/intltest/strcase.cpp index a963f517a26..854f4ec9140 100644 --- a/icu4c/source/test/intltest/strcase.cpp +++ b/icu4c/source/test/intltest/strcase.cpp @@ -626,6 +626,7 @@ StringCaseTest::TestTitleOptions() { TestCasingImpl(u"«ijs»", u"«İjs»", TEST_TITLE, nullptr, "tr-DE", U_TITLECASE_WHOLE_STRING); +#if !UCONFIG_NO_BREAK_ITERATION // Test conflicting settings. // If & when we add more options, then the ORed combinations may become // indistinguishable from valid values. @@ -653,6 +654,7 @@ StringCaseTest::TestTitleOptions() { errorCode.errorName()); } errorCode.reset(); +#endif } void @@ -1387,6 +1389,7 @@ void StringCaseTest::TestLongUnicodeString() { assertEquals("string length 306", expected, s); } +#if !UCONFIG_NO_BREAK_ITERATION void StringCaseTest::TestBug13127() { // Test case crashed when the bug was present. const char16_t *s16 = u"日本語"; @@ -1403,3 +1406,4 @@ void StringCaseTest::TestInPlaceTitle() { assertEquals("u_strToTitle(in-place) length", u_strlen(expected), length); assertEquals("u_strToTitle(in-place)", expected, s); } +#endif diff --git a/icu4c/source/test/intltest/usettest.cpp b/icu4c/source/test/intltest/usettest.cpp index a6ba3e86253..dc1eeacf0c2 100644 --- a/icu4c/source/test/intltest/usettest.cpp +++ b/icu4c/source/test/intltest/usettest.cpp @@ -3940,6 +3940,7 @@ void UnicodeSetTest::TestIntOverflow() { } void UnicodeSetTest::TestUnusedCcc() { +#if !UCONFIG_NO_NORMALIZATION // All numeric ccc values 0..255 are valid, but many are unused. IcuTestErrorCode errorCode(*this, "TestUnusedCcc"); UnicodeSet ccc2(u"[:ccc=2:]", errorCode); @@ -3965,4 +3966,5 @@ void UnicodeSetTest::TestUnusedCcc() { assertEquals("[:ccc=1.1:] -> illegal argument", U_ILLEGAL_ARGUMENT_ERROR, errorCode.reset()); assertTrue("[:ccc=1.1:] -> empty set", ccc1_1.isEmpty()); +#endif } diff --git a/icu4c/source/tools/toolutil/swapimpl.cpp b/icu4c/source/tools/toolutil/swapimpl.cpp index 620a387e244..a64a6a1703f 100644 --- a/icu4c/source/tools/toolutil/swapimpl.cpp +++ b/icu4c/source/tools/toolutil/swapimpl.cpp @@ -56,6 +56,7 @@ #include "sprpimpl.h" #include "propname.h" #include "rbbidata.h" +#include "utrie.h" #include "utrie2.h" #include "dictionarydata.h"