1999-08-16 21:50:52 +00:00
|
|
|
|
2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2001-03-21 20:09:56 +00:00
|
|
|
* Copyright (c) 1997-2001, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* TestChoiceFormat is a third level test class
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "intltest.h"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* tests Choice Format, functionality of examples, as well as API functionality
|
|
|
|
**/
|
|
|
|
class TestChoiceFormat: public IntlTest {
|
|
|
|
/**
|
|
|
|
* tests basic functionality in a simple example
|
|
|
|
**/
|
|
|
|
void TestSimpleExample(void);
|
|
|
|
/**
|
|
|
|
* tests functionality in a more complex example,
|
|
|
|
* and extensive API functionality.
|
|
|
|
* See verbose message output statements for specifically tested API
|
|
|
|
**/
|
|
|
|
void TestComplexExample(void);
|
2001-06-11 19:11:24 +00:00
|
|
|
|
|
|
|
// We can deprecate the test code right away; the API itself goes 2002-Jun-30
|
|
|
|
#ifdef ICU_ENABLE_DEPRECATED_NEXTDOUBLE
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* test the use of next_Double with ChoiceFormat
|
|
|
|
**/
|
|
|
|
void TestChoiceNextDouble(void);
|
|
|
|
/**
|
|
|
|
* test the numerical results of next_Double and previous_Double
|
|
|
|
**/
|
|
|
|
void TestGapNextDouble(void);
|
2001-06-11 19:11:24 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* utiltity function for TestGapNextDouble
|
|
|
|
**/
|
|
|
|
void testValue( double val );
|
2001-06-11 19:11:24 +00:00
|
|
|
#endif
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-06-11 17:22:24 +00:00
|
|
|
/**
|
|
|
|
* Test new closure API
|
|
|
|
*/
|
|
|
|
void TestClosures(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test applyPattern
|
|
|
|
*/
|
|
|
|
void TestPatterns(void);
|
|
|
|
|
|
|
|
void _testPattern(const char* pattern,
|
|
|
|
UBool isValid,
|
|
|
|
double v1, const char* str1,
|
|
|
|
double v2, const char* str2,
|
|
|
|
double v3, const char* str3);
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* runs tests in local funtions:
|
|
|
|
**/
|
2000-08-14 21:42:36 +00:00
|
|
|
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
|
1999-08-16 21:50:52 +00:00
|
|
|
};
|