From 58fd505a841c34e10bcd98b72324bcf8e9828bec Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Tue, 30 Jun 2015 17:20:55 +0000 Subject: [PATCH] ICU-11628 Fix uconfig test failures X-SVN-Rev: 37631 --- .../test/intltest/datadrivennumberformattestsuite.cpp | 5 ++++- .../source/test/intltest/datadrivennumberformattestsuite.h | 5 ++++- icu4c/source/test/intltest/itutil.cpp | 3 +-- icu4c/source/test/intltest/numberformattesttuple.cpp | 5 ++++- icu4c/source/test/intltest/numberformattesttuple.h | 5 ++++- icu4c/source/test/intltest/tsmthred.cpp | 6 +++++- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp b/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp index 8c4623af595..6d760ae97ae 100644 --- a/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp +++ b/icu4c/source/test/intltest/datadrivennumberformattestsuite.cpp @@ -5,6 +5,9 @@ ********************************************************************/ #include "datadrivennumberformattestsuite.h" + +#if !UCONFIG_NO_FORMATTING + #include "charstr.h" #include "ucbuf.h" #include "unicode/localpointer.h" @@ -297,4 +300,4 @@ UBool DataDrivenNumberFormatTestSuite::isSelectPass( } return TRUE; } - +#endif /* !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/test/intltest/datadrivennumberformattestsuite.h b/icu4c/source/test/intltest/datadrivennumberformattestsuite.h index d8d5471314c..9af62376fd6 100644 --- a/icu4c/source/test/intltest/datadrivennumberformattestsuite.h +++ b/icu4c/source/test/intltest/datadrivennumberformattestsuite.h @@ -8,6 +8,9 @@ #define _DATADRIVENNUMBERFORMATTESTSUITE_H__ #include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + #include "unicode/uobject.h" #include "unicode/unistr.h" #include "numberformattesttuple.h" @@ -134,5 +137,5 @@ class DataDrivenNumberFormatTestSuite : public IntlTest { UnicodeString &appendErrorMessage, UErrorCode &status); }; - +#endif /* !UCONFIG_NO_FORMATTING */ #endif // _DATADRIVENNUMBERFORMATTESTSUITE_ diff --git a/icu4c/source/test/intltest/itutil.cpp b/icu4c/source/test/intltest/itutil.cpp index 40ff1d28072..a378cee3c99 100644 --- a/icu4c/source/test/intltest/itutil.cpp +++ b/icu4c/source/test/intltest/itutil.cpp @@ -645,13 +645,12 @@ void LocalPointerTest::TestLocalXyzPointerMoveSwap() { #else infoln("TestLocalXyzPointerMoveSwap() without rvalue references"); #endif -#endif /* !UCONFIG_NO_NORMALIZATION */ - // Move self assignment leaves the object valid but in an undefined state. // Do it to make sure there is no crash, // but do not check for any particular resulting value. f1.moveFrom(f1); f3.moveFrom(f3); +#endif /* !UCONFIG_NO_NORMALIZATION */ } // Try LocalXyzPointer types with NULL pointers. diff --git a/icu4c/source/test/intltest/numberformattesttuple.cpp b/icu4c/source/test/intltest/numberformattesttuple.cpp index 9caae2519c8..366b893c67a 100644 --- a/icu4c/source/test/intltest/numberformattesttuple.cpp +++ b/icu4c/source/test/intltest/numberformattesttuple.cpp @@ -6,6 +6,9 @@ */ #include "numberformattesttuple.h" + +#if !UCONFIG_NO_FORMATTING + #include "ustrfmt.h" #include "charstr.h" #include "cstring.h" @@ -441,4 +444,4 @@ NumberFormatTestTuple::isFlag(int32_t fieldId) const { return *static_cast(flagAddr); } - +#endif /* !UCONFIG_NO_FORMATTING */ diff --git a/icu4c/source/test/intltest/numberformattesttuple.h b/icu4c/source/test/intltest/numberformattesttuple.h index 415b828eb8e..4af44b9d6ac 100644 --- a/icu4c/source/test/intltest/numberformattesttuple.h +++ b/icu4c/source/test/intltest/numberformattesttuple.h @@ -8,6 +8,9 @@ #define _NUMBER_FORMAT_TEST_TUPLE #include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + #include "decimalformatpattern.h" #include "unicode/decimfmt.h" #include "unicode/ucurr.h" @@ -221,5 +224,5 @@ private: UBool isFlag(int32_t fieldId) const; }; - +#endif /* !UCONFIG_NO_FORMATTING */ #endif diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index 84615e2aade..249a78a8ee8 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -124,12 +124,14 @@ void MultithreadTest::runIndexedTest( int32_t index, UBool exec, TestUnifiedCache(); } break; +#if !UCONFIG_NO_TRANSLITERATION case 9: name = "TestBreakTranslit"; if (exec) { TestBreakTranslit(); } break; +#endif default: name = ""; break; //needed to end loop @@ -1421,7 +1423,7 @@ void MultithreadTest::TestUnifiedCache() { } } - +#if !UCONFIG_NO_TRANSLITERATION // // BreakTransliterator Threading Test // This is a test for bug #11603. Test verified to fail prior to fix. @@ -1476,3 +1478,5 @@ void MultithreadTest::TestBreakTranslit() { gTranslitInput = NULL; gTranslitExpected = NULL; } + +#endif /* !UCONFIG_NO_TRANSLITERATION */