ICU-12738 ICU4C BRS, fixes to conditionals/includes/makefiles/scripts from testing public/private headers

X-SVN-Rev: 39375
This commit is contained in:
Peter Edberg 2016-09-28 04:17:24 +00:00
parent 5f2c294d1c
commit eccbc645aa
20 changed files with 70 additions and 51 deletions

View file

@ -242,7 +242,7 @@ public:
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
// do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
/**
* Move assignment, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
@ -258,7 +258,6 @@ public:
src.ptr=NULL;
return *this;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Swap pointers.
* @param other other smart pointer
@ -392,7 +391,7 @@ public:
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
// do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
/**
* Move assignment, leaves src with isNull().
* The behavior is undefined if *this and src are the same object.
@ -408,7 +407,6 @@ public:
src.ptr=NULL;
return *this;
}
#endif /* U_HIDE_DRAFT_API */
/**
* Swap pointers.
* @param other other smart pointer

View file

@ -186,7 +186,8 @@ protected:
/** @internal */
UHashtable *nodes;
#ifndef U_HIDE_INTERNAL_API
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// it is needed for layout of other objects.
/** @internal */
class Node : public UObject {
public:
@ -245,6 +246,7 @@ protected:
int32_t offset;
};
#ifndef U_HIDE_INTERNAL_API
// This class should not be overridden because
// registerFinalValue() compares a stack-allocated FinalValueNode
// (stack-allocated so that we don't unnecessarily create lots of duplicate nodes)
@ -260,7 +262,10 @@ protected:
protected:
int32_t value;
};
#endif /* U_HIDE_INTERNAL_API */
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// it is needed for layout of other objects.
/**
* @internal
*/
@ -278,6 +283,7 @@ protected:
int32_t value;
};
#ifndef U_HIDE_INTERNAL_API
/**
* @internal
*/
@ -291,7 +297,10 @@ protected:
protected:
Node *next;
};
#endif /* U_HIDE_INTERNAL_API */
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// it is needed for layout of other objects.
/**
* @internal
*/
@ -307,6 +316,7 @@ protected:
Node *next;
};
#ifndef U_HIDE_INTERNAL_API
/**
* @internal
*/

View file

@ -18,6 +18,8 @@
#ifndef UBIDITRANSFORM_H
#define UBIDITRANSFORM_H
#include "unicode/utypes.h"
#include "unicode/ubidi.h"
#include "unicode/uchar.h"
#include "unicode/localpointer.h"

View file

@ -1915,7 +1915,7 @@ public:
return moveFrom(src);
}
#endif
#ifndef U_HIDE_DRAFT_API
// do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
/**
* Move assignment, might leave src in bogus state.
* This string will have the same contents and state that the source string had.
@ -1927,7 +1927,6 @@ public:
* @draft ICU 56
*/
UnicodeString &moveFrom(UnicodeString &src) U_NOEXCEPT;
#endif /* U_HIDE_DRAFT_API */
/**
* Swap strings.

View file

@ -24,8 +24,6 @@
#include "unicode/uiter.h"
#include "unicode/unorm2.h"
#ifndef U_HIDE_DEPRECATED_API
/**
* \file
* \brief C API: Unicode Normalization
@ -131,6 +129,8 @@
* For more usage examples, see the Unicode Standard Annex.
*/
// Do not conditionalize the following enum with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of Normalizer object.
/**
* Constants for normalization modes.
* @deprecated ICU 56 Use unorm2.h instead.
@ -155,6 +155,8 @@ typedef enum {
UNORM_MODE_COUNT
} UNormalizationMode;
#ifndef U_HIDE_DEPRECATED_API
/**
* Constants for options flags for normalization.
* Use 0 for default options,

View file

@ -425,13 +425,13 @@ enum UCalendarDateFields {
*/
UCAL_IS_LEAP_MONTH,
#ifndef U_HIDE_DEPRECATED_API
// Do not conditionalize with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of Calendar, DateFormat, and other objects
/**
* One more than the highest normal UCalendarDateFields value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UCAL_FIELD_COUNT,
#endif // U_HIDE_DEPRECATED_API
/**
* Field number indicating the

View file

@ -341,13 +341,14 @@ typedef enum {
* @stable ICU 2.8
*/
UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2,
#ifndef U_HIDE_DEPRECATED_API
// Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of RuleBasedCollator object.
/**
* One more than the highest normal UColAttribute value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UCOL_ATTRIBUTE_COUNT
#endif // U_HIDE_DEPRECATED_API
} UColAttribute;
/** Options for retrieving the rule string

View file

@ -901,13 +901,14 @@ typedef enum UDateFormatBooleanAttribute {
* @stable ICU 56
*/
UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3,
#ifndef U_HIDE_DEPRECATED_API
// Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of DateFormat object.
/**
* One more than the highest normal UDateFormatBooleanAttribute value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4
#endif // U_HIDE_DEPRECATED_API
} UDateFormatBooleanAttribute;
/**

View file

@ -85,13 +85,14 @@ typedef enum UDateTimePatternField {
UDATPG_FRACTIONAL_SECOND_FIELD,
/** @stable ICU 3.8 */
UDATPG_ZONE_FIELD,
#ifndef U_HIDE_DEPRECATED_API
// Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of DateTimePatternGenerator object.
/**
* One more than the highest normal UDateTimePatternField value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDATPG_FIELD_COUNT
#endif // U_HIDE_DEPRECATED_API
} UDateTimePatternField;
/**

View file

@ -325,13 +325,14 @@ enum UCurrencySpacing {
UNUM_CURRENCY_SURROUNDING_MATCH,
/** @stable ICU 4.8 */
UNUM_CURRENCY_INSERT,
#ifndef U_HIDE_DEPRECATED_API
// Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
// it is needed for layout of DecimalFormatSymbols object.
/**
* One more than the highest normal UCurrencySpacing value.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UNUM_CURRENCY_SPACING_COUNT
#endif // U_HIDE_DEPRECATED_API
};
typedef enum UCurrencySpacing UCurrencySpacing; /**< @stable ICU 4.8 */

View file

@ -9,6 +9,8 @@
#ifndef COLLATION_TEST_DATA
#define COLLATION_TEST_DATA
#include "unicode/utypes.h"
#define COUNT_TEST_CASES 13
const UChar testSourceCases[][16] = {

View file

@ -18,6 +18,8 @@
#define _CCALTST
#include "unicode/utypes.h"
#include "unicode/ucal.h"
#include "unicode/udat.h"
#if !UCONFIG_NO_FORMATTING

View file

@ -19,6 +19,7 @@
#define _CDATFRMTST
#include "unicode/utypes.h"
#include "unicode/udat.h"
#if !UCONFIG_NO_FORMATTING

View file

@ -19,6 +19,7 @@
#define _CDTFRRGSTST
#include "unicode/utypes.h"
#include "unicode/udat.h"
#if !UCONFIG_NO_FORMATTING

View file

@ -19,6 +19,7 @@
#define _CDTFRRGSTST
#include "unicode/utypes.h"
#include "unicode/udat.h"
#if !UCONFIG_NO_FORMATTING

View file

@ -20,6 +20,7 @@
#define _CNUMDEPTST
#include "unicode/utypes.h"
#include "unicode/unum.h"
#if !UCONFIG_NO_FORMATTING

View file

@ -17,6 +17,10 @@
*/
#ifndef _CRESTSTN
#define _CRESTSTN
#include "unicode/utypes.h"
#include "unicode/ures.h"
/* C TEST FOR NEW RESOURCEBUNDLE API*/
#include "cintltst.h"

View file

@ -16,9 +16,12 @@
*/
#ifndef _NCCBTST
#define _NCCBTST
#include "unicode/utypes.h"
#include "unicode/ucnv.h"
/* C API TEST FOR CALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
#include "cintltst.h"
#include "unicode/utypes.h"
static void TestSkipCallBack(void);

View file

@ -53,7 +53,7 @@ E_DEP="[6/$(E_NUM)] Hide Deprecated: "
E_INT="[7/$(E_NUM)] Hide Internal: "
E_OBS="[8/$(E_NUM)] Hide Obsolete: "
check: dtest ctest cpptest lotest doclean drafttest deprtest internaltest obsoletetest
check: dtest ctest cpptest doclean drafttest deprtest internaltest obsoletetest
ifeq ($(MAKECMDGOALS),check)
$(MAKE) clean
else
@ -74,15 +74,7 @@ cpptest:
done ;\
exit $$FAIL
lotest:
@FAIL=0;for file in $(prefix)/include/layout/*.h; do \
incfile=`basename $$file .h` ; \
echo "$@ layout/$$incfile.h" ; \
echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
echo 'void junk(){}' >> ht_$$incfile.cpp ; \
$(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp || FAIL=1; \
done ;\
exit $$FAIL
# layout is removed
dtest:
@FAIL=0;NONE="(No deprecated headers)";for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
@ -178,5 +170,5 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
.PHONY: doclean check all cpptest lotest dtest ctest clean distclean
.PHONY: doclean check all cpptest dtest ctest clean distclean

View file

@ -32,22 +32,17 @@ for file in `ls io/*.h`; do
$CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
done ;
# layout is deprecated, but layoutex is not.
# layout is removed.
for file in `ls layout/*.h`; do
echo $file
echo '#include "'$file'"' > ht_temp.cpp ;
echo 'void noop() {}' >> ht_temp.cpp ;
$CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
done ;
# layoutex now depends on external additions such as HarfBuzz, skip here
# -I . for includes of layout/*.h
for file in `ls layoutex/*.h`; do
echo $file
echo '#include "'$file'"' > ht_temp.cpp ;
echo 'void noop() {}' >> ht_temp.cpp ;
$CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ;
done ;
#for file in `ls layoutex/*.h`; do
# echo $file
# echo '#include "'$file'"' > ht_temp.cpp ;
# echo 'void noop() {}' >> ht_temp.cpp ;
# $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ;
#done ;
# Tools
@ -83,7 +78,7 @@ for file in `ls tools/ctestfw/unicode/*.h`; do
done ;
# C not C++ for cintltst
for file in `ls tools/cintltst/*.h`; do
for file in `ls test/cintltst/*.h`; do
echo $file
echo '#include "'$file'"' > ht_temp.cpp ;
echo 'void noop() {}' >> ht_temp.cpp ;
@ -99,12 +94,14 @@ for test in intltest iotest testmap thaitest; do
done ;
done ;
for file in `ls test/letest/*.h`; do
echo $file
echo '#include "'$file'"' > ht_temp.cpp ;
echo 'void noop() {}' >> ht_temp.cpp ;
$CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ;
done ;
# layoutex now depends on external additions such as HarfBuzz, skip here
#for file in `ls test/letest/*.h`; do
# echo $file
# echo '#include "'$file'"' > ht_temp.cpp ;
# echo 'void noop() {}' >> ht_temp.cpp ;
# $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ;
#done ;
# TODO: perf/*/*.h