ICU-13069 enables code to compile when UCONFIG_NO_NORMALIZATION is set to 1; all unit tests pass.

X-SVN-Rev: 40388
This commit is contained in:
Norbert Runge 2017-09-12 20:29:14 +00:00
parent 855271ff6d
commit 52417e2221
6 changed files with 21 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
}

View file

@ -56,6 +56,7 @@
#include "sprpimpl.h"
#include "propname.h"
#include "rbbidata.h"
#include "utrie.h"
#include "utrie2.h"
#include "dictionarydata.h"