ICU-5070 Fix for Visual Age 7
X-SVN-Rev: 19226
This commit is contained in:
parent
76a693d73f
commit
422d7dbe64
@ -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.
|
||||
********************************************************************/
|
||||
/*******************************************************************************
|
||||
@ -193,43 +193,45 @@ static void TestExponential(void)
|
||||
char tempMsgBug[256];
|
||||
double a;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
#ifdef OS390
|
||||
double val[] = { 0.01234, 123456789, 1.23e75, -3.141592653e-78 };
|
||||
#ifndef IEEE_754
|
||||
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
|
||||
#ifndef IEEE_754
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user