ICU-7369 Clean up uconfig test failures.
X-SVN-Rev: 27406
This commit is contained in:
parent
5150340844
commit
d80b144c19
@ -5,7 +5,9 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !UCONFIG_NO_FORMAT
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#include "fphdlimp.h"
|
||||
#include "uvectr32.h"
|
||||
@ -112,4 +114,5 @@ FieldPositionIteratorHandler::isRecording(void) {
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* !UCONFIG_NO_FORMAT */
|
||||
#endif /* !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2009, International Business Machines Corporation and *
|
||||
* Copyright (C) 2009-2010, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -8,7 +8,7 @@
|
||||
#ifndef FPHDLIMP_H
|
||||
#define FPHDLIMP_H
|
||||
|
||||
#if !UCONFIG_NO_FORMAT
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#include "unicode/fieldpos.h"
|
||||
#include "unicode/fpositer.h"
|
||||
@ -67,6 +67,6 @@ class FieldPositionIteratorHandler : public FieldPositionHandler {
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* !UCONFIG_NO_FORMAT */
|
||||
#endif /* !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif /* FPHDLIMP_H */
|
||||
|
@ -8,6 +8,10 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
#include "unicode/fpositer.h"
|
||||
#include "cmemory.h"
|
||||
#include "uvectr32.h"
|
||||
@ -100,3 +104,6 @@ UBool FieldPositionIterator::next(FieldPosition& fp) {
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/************************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2009, International Business Machines Corporation
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation
|
||||
* and others. All Rights Reserved.
|
||||
************************************************************************/
|
||||
|
||||
@ -491,8 +491,10 @@ CalendarTest::TestGenericAPI()
|
||||
}else {
|
||||
((Calendar *)cal)->roll(UCAL_HOUR, (int32_t)100, status);
|
||||
((Calendar *)cal)->clear(UCAL_HOUR);
|
||||
#if !UCONFIG_NO_SERVICE
|
||||
URegistryKey key = cal->registerFactory(NULL, status);
|
||||
cal->unregister(key, status);
|
||||
#endif
|
||||
}
|
||||
delete cal;
|
||||
|
||||
|
@ -292,6 +292,7 @@ void LocalPointerTest::TestLocalXyzPointer() {
|
||||
return;
|
||||
}
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
LocalUCalendarPointer cal(ucal_open(NULL, 0, "root", UCAL_GREGORIAN, errorCode));
|
||||
if(errorCode.logIfFailureAndReset("ucal_open()")) {
|
||||
return;
|
||||
@ -329,7 +330,9 @@ void LocalPointerTest::TestLocalXyzPointer() {
|
||||
errln("LocalUMessageFormatPointer failure");
|
||||
return;
|
||||
}
|
||||
#endif /* UCONFIG_NO_FORMATTING */
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
const UNormalizer2 *nfc=unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode);
|
||||
UnicodeSet emptySet;
|
||||
LocalUNormalizer2Pointer fn2(unorm2_openFiltered(nfc, emptySet.toUSet(), errorCode));
|
||||
@ -340,7 +343,9 @@ void LocalPointerTest::TestLocalXyzPointer() {
|
||||
errln("LocalUNormalizer2Pointer failure");
|
||||
return;
|
||||
}
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
UnicodeString pattern=UNICODE_STRING_SIMPLE("abc|xy+z");
|
||||
LocalURegularExpressionPointer regex(
|
||||
uregex_open(pattern.getBuffer(), pattern.length(), 0, NULL, errorCode));
|
||||
@ -351,7 +356,9 @@ void LocalPointerTest::TestLocalXyzPointer() {
|
||||
errln("LocalURegularExpressionPointer failure");
|
||||
return;
|
||||
}
|
||||
#endif /* UCONFIG_NO_REGULAR_EXPRESSIONS */
|
||||
|
||||
#if !UCONFIG_NO_TRANSLITERATION
|
||||
UnicodeString id=UNICODE_STRING_SIMPLE("Grek-Latn");
|
||||
LocalUTransliteratorPointer trans(
|
||||
utrans_openU(id.getBuffer(), id.length(), UTRANS_FORWARD, NULL, 0, NULL, errorCode));
|
||||
@ -362,6 +369,7 @@ void LocalPointerTest::TestLocalXyzPointer() {
|
||||
errln("LocalUTransliteratorPointer failure");
|
||||
return;
|
||||
}
|
||||
#endif /* !UCONFIG_NO_TRANSLITERATION */
|
||||
|
||||
// destructors
|
||||
}
|
||||
@ -376,6 +384,7 @@ void LocalPointerTest::TestLocalXyzPointerNull() {
|
||||
ucnvsel_open(&encoding, 1, NULL, UCNV_ROUNDTRIP_SET, errorCode));
|
||||
sel.adoptInstead(NULL);
|
||||
}
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
{
|
||||
IcuTestErrorCode errorCode(*this, "TestLocalXyzPointerNull/LocalUCalendarPointer");
|
||||
LocalUCalendarPointer null;
|
||||
@ -396,6 +405,9 @@ void LocalPointerTest::TestLocalXyzPointerNull() {
|
||||
umsg_open(hello.getBuffer(), hello.length(), "root", NULL, errorCode));
|
||||
msg.adoptInstead(NULL);
|
||||
}
|
||||
#endif /* !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||
{
|
||||
IcuTestErrorCode errorCode(*this, "TestLocalXyzPointerNull/LocalURegularExpressionPointer");
|
||||
UnicodeString pattern=UNICODE_STRING_SIMPLE("abc|xy+z");
|
||||
@ -404,6 +416,9 @@ void LocalPointerTest::TestLocalXyzPointerNull() {
|
||||
uregex_open(pattern.getBuffer(), pattern.length(), 0, NULL, errorCode));
|
||||
regex.adoptInstead(NULL);
|
||||
}
|
||||
#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */
|
||||
|
||||
#if !UCONFIG_NO_TRANSLITERATION
|
||||
{
|
||||
IcuTestErrorCode errorCode(*this, "TestLocalXyzPointerNull/LocalUTransliteratorPointer");
|
||||
UnicodeString id=UNICODE_STRING_SIMPLE("Grek-Latn");
|
||||
@ -412,4 +427,6 @@ void LocalPointerTest::TestLocalXyzPointerNull() {
|
||||
utrans_openU(id.getBuffer(), id.length(), UTRANS_FORWARD, NULL, 0, NULL, errorCode));
|
||||
trans.adoptInstead(NULL);
|
||||
}
|
||||
#endif /* !UCONFIG_NO_TRANSLITERATION */
|
||||
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ void LocaleDisplayNamesTest::runIndexedTest(int32_t index, UBool exec, const cha
|
||||
}
|
||||
}
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
void LocaleDisplayNamesTest::TestCreate() {
|
||||
UnicodeString temp;
|
||||
LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getGermany());
|
||||
@ -225,3 +226,6 @@ void LocaleDisplayNamesTest::TestRootEtc() {
|
||||
|
||||
delete ldn;
|
||||
}
|
||||
|
||||
#endif /* UCONFIG_NO_FORMATTING */
|
||||
|
||||
|
@ -2123,7 +2123,7 @@ TimeZoneRuleTest::TestT6669(void) {
|
||||
|
||||
void
|
||||
TimeZoneRuleTest::TestVTimeZoneWrapper(void) {
|
||||
|
||||
#if 0
|
||||
// local variables
|
||||
UBool b;
|
||||
UChar * data = NULL;
|
||||
@ -2236,6 +2236,7 @@ TimeZoneRuleTest::TestVTimeZoneWrapper(void) {
|
||||
vzone_close(v2);
|
||||
ztrans_close(zt1);
|
||||
ztrans_close(zt2);
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------- private test helpers -------------------------------------------------
|
||||
|
@ -178,6 +178,7 @@ derivedPropsLineFn(void *context,
|
||||
}
|
||||
|
||||
void UnicodeTest::TestAdditionalProperties() {
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
// test DerivedCoreProperties.txt and DerivedNormalizationProps.txt
|
||||
if(LENGTHOF(derivedProps)<LENGTHOF(derivedPropsNames)) {
|
||||
errln("error: UnicodeTest::derivedProps[] too short, need at least %d UnicodeSets\n",
|
||||
@ -275,6 +276,7 @@ void UnicodeTest::TestAdditionalProperties() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
}
|
||||
|
||||
void UnicodeTest::TestBinaryValues() {
|
||||
|
@ -894,6 +894,7 @@ void UnicodeSetTest::TestPropertySet() {
|
||||
"abc",
|
||||
"ABC",
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
// Combining class: @since ICU 2.2
|
||||
// Check both symbolic and numeric
|
||||
"\\p{ccc=Nukta}",
|
||||
@ -907,6 +908,7 @@ void UnicodeSetTest::TestPropertySet() {
|
||||
"[:c c c = iota subscript :]",
|
||||
"\\u0345",
|
||||
"xyz",
|
||||
#endif
|
||||
|
||||
// Bidi class: @since ICU 2.2
|
||||
"\\p{bidiclass=lefttoright}",
|
||||
@ -1018,6 +1020,7 @@ void UnicodeSetTest::TestPropertySet() {
|
||||
"abcd\\uDC00",
|
||||
"ef\\uD800\\U00010000",
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
"[:^lccc=0:]", // Lead canonical class
|
||||
"\\u0300\\u0301",
|
||||
"abcd\\u00c0\\u00c5",
|
||||
@ -1037,6 +1040,7 @@ void UnicodeSetTest::TestPropertySet() {
|
||||
"[[:ccc=0:]-[:lccc=0:]-[:tccc=0:]]", // Weirdos. Complete canonical class is zero, but both lead and trail are not
|
||||
"\\u0F73\\u0F75\\u0F81",
|
||||
"abcd\\u0300\\u0301\\u00c0\\u00c5",
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
|
||||
"[:Assigned:]",
|
||||
"A\\uE000\\uF8FF\\uFDC7\\U00010000\\U0010FFFD",
|
||||
|
@ -1856,6 +1856,7 @@ writeAllCC(FILE *f) {
|
||||
fprintf(f, "# Canonical_Combining_Class (ccc) values\n");
|
||||
prevCode=0;
|
||||
prevCC=0;
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
for(code=0; code<=0x110000;) {
|
||||
if(code==0x110000) {
|
||||
cc=0;
|
||||
@ -1886,8 +1887,10 @@ writeAllCC(FILE *f) {
|
||||
++code;
|
||||
}
|
||||
}
|
||||
#endif /* UCONFIG_NO_NORMALIZATION */
|
||||
}
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
static UBool
|
||||
hasMapping(uint32_t code) {
|
||||
Norm *norm=norms+utrie_get32(normTrie, code, NULL);
|
||||
@ -1923,6 +1926,7 @@ hasOneWayMapping(uint32_t code, UBool withCompat) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
|
||||
static void
|
||||
writeAllMappings(FILE *f, UBool withCompat) {
|
||||
@ -1934,6 +1938,7 @@ writeAllMappings(FILE *f, UBool withCompat) {
|
||||
} else {
|
||||
fprintf(f, "\n# Canonical decomposition mappings\n");
|
||||
}
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
for(code=0; code<=0x10ffff;) {
|
||||
i=utrie_get32(normTrie, code, &isInBlockZero);
|
||||
if(isInBlockZero) {
|
||||
@ -1965,6 +1970,7 @@ writeAllMappings(FILE *f, UBool withCompat) {
|
||||
++code;
|
||||
}
|
||||
}
|
||||
#endif /* !UCONFIG_NO_NORMALIZATION */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines
|
||||
* Copyright (C) 2002-2010, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Date Name Description
|
||||
@ -37,6 +37,7 @@ U_NAMESPACE_USE
|
||||
#include "unicode/uchar.h"
|
||||
#include "unicode/uscript.h"
|
||||
#include "unicode/unorm.h"
|
||||
#include "unicode/unorm2.h"
|
||||
|
||||
class AliasName {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user