ICU-10981 round of uconfig.h fixes

X-SVN-Rev: 36491
This commit is contained in:
Steven R. Loomis 2014-09-13 00:53:06 +00:00
parent c07492e9ad
commit 58f8e44c7d
5 changed files with 22 additions and 7 deletions

View file

@ -702,7 +702,7 @@ static char plugin_file[2048] = "";
U_INTERNAL const char* U_EXPORT2
uplug_getPluginFile() {
#if U_ENABLE_DYLOAD
#if U_ENABLE_DYLOAD && !UCONFIG_NO_FILE_IO
return plugin_file;
#else
return NULL;
@ -714,7 +714,7 @@ U_CAPI void U_EXPORT2
uplug_init(UErrorCode *status) {
#if !U_ENABLE_DYLOAD
(void)status; /* unused */
#else
#elif !UCONFIG_NO_FILE_IO
CharString plugin_dir;
const char *env = getenv("ICU_PLUGINS");

View file

@ -12,6 +12,8 @@
#include "unicode/utypes.h"
#include "unicode/uobject.h"
#if !UCONFIG_NO_FORMATTING
U_NAMESPACE_BEGIN
class SimplePatternFormatter;
@ -113,3 +115,5 @@ private:
U_NAMESPACE_END
#endif
#endif

View file

@ -423,8 +423,8 @@ DecimalFormatSymbols::getSymbol(ENumberFormatSymbol symbol) const {
return *strPtr;
}
#ifndef U_HIDE_INTERNAL_API
//#ifndef U_HIDE_INTERNAL_API
// See comments above for this function. Not hidden.
inline const UnicodeString &
DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
const UnicodeString *strPtr;
@ -436,7 +436,7 @@ DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
return *strPtr;
}
#endif /* U_HIDE_INTERNAL_API */
//#endif /* U_HIDE_INTERNAL_API */
// -------------------------------------

View file

@ -71,8 +71,9 @@ static void TestICUDataName(void);
static void PointerTableOfContents(void);
static void SetBadCommonData(void);
static void TestUDataFileAccess(void);
#if !UCONFIG_NO_FORMATTING
static void TestTZDataDir(void);
#endif
void addUDataTest(TestNode** root);
@ -94,7 +95,9 @@ addUDataTest(TestNode** root)
addTest(root, &PointerTableOfContents, "udatatst/PointerTableOfContents" );
addTest(root, &SetBadCommonData, "udatatst/SetBadCommonData" );
addTest(root, &TestUDataFileAccess, "udatatst/TestUDataFileAccess" );
#if !UCONFIG_NO_FORMATTING
addTest(root, &TestTZDataDir, "udatatst/TestTZDataDir" );
#endif
}
#if 0
@ -1376,7 +1379,10 @@ static const struct {
#endif
#if !UCONFIG_NO_NORMALIZATION && !UCONFIG_ONLY_COLLATION
{"nfkc", "nrm", unorm2_swap},
{"confusables", "cfu", uspoof_swap},
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
{"confusables", "cfu", uspoof_swap}, /* spoof data missing without regex */
#endif
#endif
{"unames", "icu", uchar_swapNames}
/* the last item should not be #if'ed so that it can reliably omit the last comma */
@ -1824,6 +1830,7 @@ static void SetBadCommonData(void) {
// make check
static void TestTZDataDir(void) {
#if !UCONFIG_NO_FORMATTING
UErrorCode status = U_ZERO_ERROR;
const char *tzDataVersion;
const char *testDataPath;
@ -1854,4 +1861,5 @@ static void TestTZDataDir(void) {
if (strcmp("2014a", tzDataVersion) == 0) {
log_err("File %s:%d - expected something newer than time zone data 2014a.\n", __FILE__, __LINE__, tzDataVersion);
}
#endif
}

View file

@ -15,6 +15,7 @@
#include "unicode/numfmt.h"
#include "unicode/plurrule.h"
class QuantityFormatterTest : public IntlTest {
public:
QuantityFormatterTest() {
@ -32,6 +33,7 @@ void QuantityFormatterTest::runIndexedTest(int32_t index, UBool exec, const char
void QuantityFormatterTest::TestBasic() {
UErrorCode status = U_ZERO_ERROR;
#if !UCONFIG_NO_FORMATTING
QuantityFormatter fmt;
assertFalse(
"adding bad variant",
@ -139,6 +141,7 @@ void QuantityFormatterTest::TestBasic() {
}
fmt.reset();
assertFalse("isValid after reset", fmt.isValid());
#endif
assertSuccess("", status);
}