summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c')
-rw-r--r--Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c b/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c
index 8b1f114c18b..24982323ade 100644
--- a/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c
+++ b/Build/source/libs/icu-xetex/test/cintltst/cnmdptst.c
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2004, International Business Machines Corporation
+ * Copyright (c) 1997-2006, International Business Machines Corporation
* and others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
@@ -194,42 +194,44 @@ static void TestExponential(void)
double a;
UErrorCode status = U_ZERO_ERROR;
#ifdef OS390
- double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 };
+ static const double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 };
#else
- double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 };
+ static const double val[] = { 0.01234, 123456789, 1.23e300, -3.141592653e-271 };
#endif
- const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" };
- int32_t lval[] = { 0, -1, 1, 123456789 };
+ static const char* pat[] = { "0.####E0", "00.000E00", "##0.######E000", "0.###E0;[0.###E0]" };
+ static const int32_t lval[] = { 0, -1, 1, 123456789 };
- const char* valFormat[] =
+ static const char* valFormat[] =
{
"1.234E-2", "1.2346E8", "1.23E300", "-3.1416E-271",
- "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272",
- "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273",
- "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]"
+ "12.340E-03", "12.346E07", "12.300E299", "-31.416E-272",
+ "12.34E-003", "123.4568E006", "1.23E300", "-314.1593E-273",
+ "1.234E-2", "1.235E8", "1.23E300", "[3.142E-271]"
};
- const char* lvalFormat[] =
+ static const char* lvalFormat[] =
{
"0E0", "-1E0", "1E0", "1.2346E8",
- "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07",
- "0E000", "-1E000", "1E000", "123.4568E006",
- "0E0", "[1E0]", "1E0", "1.235E8"
+ "00.000E00", "-10.000E-01", "10.000E-01", "12.346E07",
+ "0E000", "-1E000", "1E000", "123.4568E006",
+ "0E0", "[1E0]", "1E0", "1.235E8"
};
- double valParse[] =
+ static const double valParse[] =
{
#ifdef OS390
0.01234, 123460000, 1.23E75, -3.1416E-78,
- 0.01234, 123460000, 1.23E75, -3.1416E-78,
- 0.01234, 123456800, 1.23E75, -3.141593E-78,
- 0.01234, 123500000, 1.23E75, -3.142E-78
+ 0.01234, 123460000, 1.23E75, -3.1416E-78,
+ 0.01234, 123456800, 1.23E75, -3.141593E-78,
+ 0.01234, 123500000, 1.23E75, -3.142E-78
#else
- 0.01234, 123460000, 1.23E300, -3.1416E-271,
- 0.01234, 123460000, 1.23E300, -3.1416E-271,
- 0.01234, 123456800, 1.23E300, -3.141593E-271,
- 0.01234, 123500000, 1.23E300, -3.142E-271
+ /* We define the whole IEEE 754 number in the 4th column because
+ Visual Age 7 has a bug in rounding numbers. */
+ 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271,
+ 0.01234, 123460000, 1.23E300, -3.1415999999999999E-271,
+ 0.01234, 123456800, 1.23E300, -3.1415929999999999E-271,
+ 0.01234, 123500000, 1.23E300, -3.1420000000000001E-271
#endif
};
- int32_t lvalParse[] =
+ static const int32_t lvalParse[] =
{
0, -1, 1, 123460000,
0, -1, 1, 123460000,
@@ -465,7 +467,7 @@ static void TestCurrencyPreEuro(void)
};
const char* result[]={
- "\\u20A7 2", "2 F", "\\u00A31.50", "1,50 mk", "1,50 F", "\\u20A4 2",
+ "\\u20A7 2", "2 F", "\\u00A31.50", "1,50 mk", "2 F", "\\u20A4 2",
"1$50 Esc.", "\\u00F6S 1,50", "1,50 \\u0394\\u03C1\\u03C7", "2 \\u20A7", "1,50 FB", "\\u00a31.50",
"1,50 BF", "1,50 DM", "1,50 BF", "\\u20A7 2", "1,50 F", "\\u20A7 2",
"fl 1,50"