ICU-3326 Don't include some unneeded headers.
X-SVN-Rev: 13965
This commit is contained in:
parent
94897ac853
commit
438ae401a3
@ -16,7 +16,9 @@
|
|||||||
#include "cstring.h"
|
#include "cstring.h"
|
||||||
#include "canittst.h"
|
#include "canittst.h"
|
||||||
#include "unicode/caniter.h"
|
#include "unicode/caniter.h"
|
||||||
|
#include "unicode/normlzr.h"
|
||||||
#include "unicode/uchar.h"
|
#include "unicode/uchar.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
#define ARRAY_LENGTH(array) ((int32_t)(sizeof (array) / sizeof (*array)))
|
#define ARRAY_LENGTH(array) ((int32_t)(sizeof (array) / sizeof (*array)))
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ class Transliterator;
|
|||||||
|
|
||||||
U_NAMESPACE_END
|
U_NAMESPACE_END
|
||||||
|
|
||||||
#include "unicode/normlzr.h"
|
|
||||||
#include "unicode/translit.h"
|
#include "unicode/translit.h"
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
@ -12,15 +12,11 @@
|
|||||||
|
|
||||||
#if !UCONFIG_NO_TRANSLITERATION
|
#if !UCONFIG_NO_TRANSLITERATION
|
||||||
|
|
||||||
#include "ittrans.h"
|
|
||||||
#include "cpdtrtst.h"
|
#include "cpdtrtst.h"
|
||||||
#include "unicode/utypes.h"
|
#include "unicode/utypes.h"
|
||||||
#include "unicode/translit.h"
|
#include "unicode/translit.h"
|
||||||
#include "cpdtrans.h"
|
#include "cpdtrans.h"
|
||||||
#include "intltest.h"
|
|
||||||
#include "cmemory.h"
|
#include "cmemory.h"
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
//---------------------------------------------
|
//---------------------------------------------
|
||||||
// runIndexedTest
|
// runIndexedTest
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#if !UCONFIG_NO_TRANSLITERATION
|
#if !UCONFIG_NO_TRANSLITERATION
|
||||||
|
|
||||||
#include "unicode/translit.h"
|
#include "unicode/translit.h"
|
||||||
#include "cpdtrans.h"
|
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#ifndef _DATEFORMATROUNDTRIPTEST_
|
#ifndef _DATEFORMATROUNDTRIPTEST_
|
||||||
#define _DATEFORMATROUNDTRIPTEST_
|
#define _DATEFORMATROUNDTRIPTEST_
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "unicode/utypes.h"
|
#include "unicode/utypes.h"
|
||||||
|
|
||||||
#if !UCONFIG_NO_FORMATTING
|
#if !UCONFIG_NO_FORMATTING
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <stdio.h> // for sprintf
|
#include <stdio.h> // for sprintf
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
// class NumberFormatRoundTripTest
|
// class NumberFormatRoundTripTest
|
||||||
@ -51,6 +52,31 @@ NumberFormatRoundTripTest::failure(UErrorCode status, const char* msg)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
NumberFormatRoundTripTest::randLong()
|
||||||
|
{
|
||||||
|
// Assume 8-bit (or larger) rand values. Also assume
|
||||||
|
// that the system rand() function is very poor, which it always is.
|
||||||
|
uint32_t d;
|
||||||
|
uint32_t i;
|
||||||
|
char* poke = (char*)&d;
|
||||||
|
for (i=0; i < sizeof(uint32_t); ++i)
|
||||||
|
{
|
||||||
|
poke[i] = (char)(rand() & 0xFF);
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a random value from -range..+range.
|
||||||
|
*/
|
||||||
|
double
|
||||||
|
NumberFormatRoundTripTest::randomDouble(double range)
|
||||||
|
{
|
||||||
|
double a = randFraction();
|
||||||
|
return (2.0 * range * a) - range;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NumberFormatRoundTripTest::start()
|
NumberFormatRoundTripTest::start()
|
||||||
{
|
{
|
||||||
@ -179,16 +205,6 @@ NumberFormatRoundTripTest::test(NumberFormat *fmt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a random value from -range..+range.
|
|
||||||
*/
|
|
||||||
double
|
|
||||||
NumberFormatRoundTripTest::randomDouble(double range)
|
|
||||||
{
|
|
||||||
double a = randFraction();
|
|
||||||
return (2.0 * range * a) - range;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NumberFormatRoundTripTest::test(NumberFormat *fmt, double value)
|
NumberFormatRoundTripTest::test(NumberFormat *fmt, double value)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "unicode/numfmt.h"
|
#include "unicode/numfmt.h"
|
||||||
#include "unicode/fmtable.h"
|
#include "unicode/fmtable.h"
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs round-trip tests for NumberFormat
|
* Performs round-trip tests for NumberFormat
|
||||||
@ -57,19 +56,7 @@ public:
|
|||||||
/*
|
/*
|
||||||
* Return a random uint32_t
|
* Return a random uint32_t
|
||||||
**/
|
**/
|
||||||
static uint32_t randLong()
|
static uint32_t randLong();
|
||||||
{
|
|
||||||
// Assume 8-bit (or larger) rand values. Also assume
|
|
||||||
// that the system rand() function is very poor, which it always is.
|
|
||||||
uint32_t d;
|
|
||||||
uint32_t i;
|
|
||||||
char* poke = (char*)&d;
|
|
||||||
for (i=0; i < sizeof(uint32_t); ++i)
|
|
||||||
{
|
|
||||||
poke[i] = (char)(rand() & 0xFF);
|
|
||||||
}
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a random double 0 <= x < 1.0
|
* Return a random double 0 <= x < 1.0
|
||||||
|
@ -34,7 +34,6 @@ Disclaimer and license
|
|||||||
/************************************************************/
|
/************************************************************/
|
||||||
/* Public interface (would normally go in its own .h file): */
|
/* Public interface (would normally go in its own .h file): */
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include "unicode/utypes.h"
|
#include "unicode/utypes.h"
|
||||||
|
|
||||||
#if !UCONFIG_NO_IDNA
|
#if !UCONFIG_NO_IDNA
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||||
|
|
||||||
|
#include "unicode/regex.h"
|
||||||
#include "unicode/uchar.h"
|
#include "unicode/uchar.h"
|
||||||
#include "unicode/ucnv.h"
|
#include "unicode/ucnv.h"
|
||||||
#include "regextst.h"
|
#include "regextst.h"
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
||||||
|
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
#include "unicode/regex.h"
|
|
||||||
|
|
||||||
|
|
||||||
class RegexTest: public IntlTest {
|
class RegexTest: public IntlTest {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
|
#if !UCONFIG_NO_IDNA && !UCONFIG_NO_TRANSLITERATION
|
||||||
|
|
||||||
#include "sprpimpl.h"
|
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
#include "unicode/parseerr.h"
|
#include "unicode/parseerr.h"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#if !UCONFIG_NO_COLLATION
|
#if !UCONFIG_NO_COLLATION
|
||||||
|
|
||||||
#include "unicode/uchar.h"
|
#include "unicode/uchar.h"
|
||||||
|
#include "unicode/ustring.h"
|
||||||
|
|
||||||
#include "dadrcoll.h"
|
#include "dadrcoll.h"
|
||||||
|
|
||||||
|
@ -11,8 +11,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "unicode/utypes.h"
|
#include "unicode/utypes.h"
|
||||||
|
#include "unicode/ustring.h"
|
||||||
#include "umutex.h"
|
#include "umutex.h"
|
||||||
#include "cmemory.h"
|
#include "cmemory.h"
|
||||||
|
#include "cstring.h"
|
||||||
|
#include "uparse.h"
|
||||||
|
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(XP_MAC) && !defined(U_RHAPSODY)
|
#if !defined(WIN32) && !defined(XP_MAC) && !defined(U_RHAPSODY)
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "unicode/decimfmt.h"
|
#include "unicode/decimfmt.h"
|
||||||
#include "tsnmfmt.h"
|
#include "tsnmfmt.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
IntlTestNumberFormat::~IntlTestNumberFormat() {}
|
IntlTestNumberFormat::~IntlTestNumberFormat() {}
|
||||||
|
|
||||||
|
@ -8,14 +8,11 @@
|
|||||||
#define _INTLTESTNUMBERFORMAT
|
#define _INTLTESTNUMBERFORMAT
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "unicode/utypes.h"
|
#include "unicode/utypes.h"
|
||||||
|
|
||||||
#if !UCONFIG_NO_FORMATTING
|
#if !UCONFIG_NO_FORMATTING
|
||||||
|
|
||||||
#include "unicode/numfmt.h"
|
#include "unicode/numfmt.h"
|
||||||
#include "unicode/fmtable.h"
|
|
||||||
#include "unicode/locid.h"
|
#include "unicode/locid.h"
|
||||||
#include "intltest.h"
|
#include "intltest.h"
|
||||||
|
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
#if !UCONFIG_NO_COLLATION
|
#if !UCONFIG_NO_COLLATION
|
||||||
|
|
||||||
#include "ucaconf.h"
|
#include "ucaconf.h"
|
||||||
|
#include "unicode/ustring.h"
|
||||||
|
#include "cstring.h"
|
||||||
|
#include "uparse.h"
|
||||||
|
|
||||||
UCAConformanceTest::UCAConformanceTest() :
|
UCAConformanceTest::UCAConformanceTest() :
|
||||||
rbUCA(NULL),
|
rbUCA(NULL),
|
||||||
testFile(NULL),
|
testFile(NULL),
|
||||||
|
@ -18,10 +18,7 @@
|
|||||||
#if !UCONFIG_NO_COLLATION
|
#if !UCONFIG_NO_COLLATION
|
||||||
|
|
||||||
#include "unicode/tblcoll.h"
|
#include "unicode/tblcoll.h"
|
||||||
#include "unicode/ustring.h"
|
|
||||||
#include "tscoll.h"
|
#include "tscoll.h"
|
||||||
#include "uparse.h"
|
|
||||||
#include "cstring.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user