mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-986 #ifdef out tests for deprecated API immediately; API itself to be removed Jun-30-2002
X-SVN-Rev: 4939
This commit is contained in:
parent
68f03c53d0
commit
44bc4891f6
3 changed files with 21 additions and 5 deletions
|
@ -263,6 +263,8 @@ static void TestPUtilAPI(){
|
|||
|
||||
}
|
||||
|
||||
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
||||
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
||||
log_verbose("Testing uprv_nextDouble() where the value is NaN ...\n");
|
||||
expn1=uprv_nextDouble(uprv_getNaN(), TRUE);
|
||||
doAssert(expn1, uprv_getNaN(), "uprv_nextDouble(uprv_getNaN(), TRUE) failed.");
|
||||
|
@ -291,6 +293,7 @@ static void TestPUtilAPI(){
|
|||
if(expn1 > 1.0 || expn1 < 0.9999){
|
||||
log_err("ERROR: uprv_nextDouble failed. Expected : %lf, Got: %f\n", y1, expn1);
|
||||
}
|
||||
#endif
|
||||
|
||||
log_verbose("Testing the API uprv_longBitsFromDouble().....\n");
|
||||
uprv_longBitsFromDouble(value1, &hi, &lo);
|
||||
|
|
|
@ -23,10 +23,13 @@ void TestChoiceFormat::runIndexedTest(int32_t index, UBool exec,
|
|||
switch (index) {
|
||||
TESTCASE(0,TestSimpleExample);
|
||||
TESTCASE(1,TestComplexExample);
|
||||
TESTCASE(2,TestChoiceNextDouble);
|
||||
TESTCASE(3,TestGapNextDouble);
|
||||
TESTCASE(4,TestClosures);
|
||||
TESTCASE(5,TestPatterns);
|
||||
TESTCASE(2,TestClosures);
|
||||
TESTCASE(3,TestPatterns);
|
||||
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
||||
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
||||
TESTCASE(4,TestChoiceNextDouble);
|
||||
TESTCASE(5,TestGapNextDouble);
|
||||
#endif
|
||||
default: name = ""; break;
|
||||
}
|
||||
}
|
||||
|
@ -283,6 +286,8 @@ TestChoiceFormat::TestComplexExample( void )
|
|||
}
|
||||
}
|
||||
|
||||
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
||||
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
||||
double nd = ChoiceFormat::nextDouble( 1.0 );
|
||||
double pd = ChoiceFormat::previousDouble( 1.0 );
|
||||
if ((ChoiceFormat::nextDouble( 1.0, TRUE ) == nd)
|
||||
|
@ -301,7 +306,7 @@ TestChoiceFormat::TestComplexExample( void )
|
|||
}else{
|
||||
it_errln("*** prevDouble");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const double limits_A[] = {1,2,3,4,5,6,7};
|
||||
const UnicodeString monthNames_A[] = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
|
||||
|
@ -475,6 +480,8 @@ TestChoiceFormat::TestComplexExample( void )
|
|||
delete pattform;
|
||||
}
|
||||
|
||||
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
||||
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
||||
/**
|
||||
* test the use of next_Double with ChoiceFormat
|
||||
**/
|
||||
|
@ -653,6 +660,7 @@ TestChoiceFormat::testValue( double val )
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Test new closure API
|
||||
|
|
|
@ -28,6 +28,9 @@ class TestChoiceFormat: public IntlTest {
|
|||
* See verbose message output statements for specifically tested API
|
||||
**/
|
||||
void TestComplexExample(void);
|
||||
|
||||
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
||||
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
||||
/**
|
||||
* test the use of next_Double with ChoiceFormat
|
||||
**/
|
||||
|
@ -36,10 +39,12 @@ class TestChoiceFormat: public IntlTest {
|
|||
* test the numerical results of next_Double and previous_Double
|
||||
**/
|
||||
void TestGapNextDouble(void);
|
||||
|
||||
/**
|
||||
* utiltity function for TestGapNextDouble
|
||||
**/
|
||||
void testValue( double val );
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Test new closure API
|
||||
|
|
Loading…
Add table
Reference in a new issue