home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / numrgts.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-07  |  3.5 KB  |  141 lines

  1. /*
  2. ********************************************************************
  3. * COPYRIGHT: 
  4. * (C) Copyright International Business Machines Corporation, 1998
  5. * Licensed Material - Program-Property of IBM - All Rights Reserved. 
  6. * US Government Users Restricted Rights - Use, duplication, or disclosure 
  7. * restricted by GSA ADP Schedule Contract with IBM Corp. 
  8. *
  9. ********************************************************************
  10. */
  11.  
  12. #ifndef _NUMBERFORMATREGRESSIONTEST_
  13. #define _NUMBERFORMATREGRESSIONTEST_
  14.  
  15. #include "utypes.h"
  16. #include "numfmt.h"
  17.  
  18. #include "intltest.h"
  19.  
  20. #include "numfmt.h"
  21.  
  22. class DecimalFormat;
  23.  
  24. /** 
  25.  * Performs regression test for MessageFormat
  26.  **/
  27. class NumberFormatRegressionTest: public IntlTest {    
  28.     
  29.     // IntlTest override
  30.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par );
  31. public:
  32.  
  33.     void Test4075713();
  34.     void Test4074620() ;
  35.     void Test4088161 ();
  36.     void Test4087245 ();
  37.     void Test4087535 ();
  38.     void Test4088503 ();
  39.     void Test4066646 () ;
  40.     float assignFloatValue(float returnfloat);
  41.     void Test4059870() ;
  42.     void Test4083018 ();
  43.     void Test4071492 ();
  44.     void Test4086575() ;
  45.     void Test4068693();
  46.     void Test4069754();
  47.     void Test4087251 ();
  48.     void Test4090489 ();
  49.     void Test4090504 ();
  50.     void Test4095713 ();
  51.     void Test4092561 ();
  52.     void Test4092480 ();
  53.     void Test4087244 () ;
  54.     void Test4070798 () ;
  55.     void Test4071005 () ;
  56.     void Test4071014 () ;
  57.     void Test4071859 () ;
  58.     void Test4093610();
  59.     void roundingTest(DecimalFormat *df, double x, UnicodeString& expected);
  60.     void Test4098741();
  61.     void Test4074454();
  62.     void Test4099404();
  63.     void Test4101481();
  64.     void Test4052223();
  65.     void Test4061302();
  66.     void Test4062486();
  67.     void Test4108738();
  68.     void Test4106658();
  69.     void Test4106662();
  70.     void Test4114639();
  71.     void Test4106664();
  72.     void Test4106667();
  73.     void Test4110936();
  74.     void Test4122840();
  75.     void Test4125885();
  76.     void Test4134034() ;
  77.     void Test4134300() ;
  78.     void Test4140009() ;
  79.     void Test4141750() ;
  80.     void Test4145457() ;
  81.     void Test4147295() ;
  82.     void Test4147706() ;
  83.  
  84.     void Test4162198() ;
  85.     void Test4162852() ;
  86.  
  87.     void Test4167494();
  88.     void Test4170798();
  89.     void Test4176114();
  90.     void Test4179818();
  91.     void Test4212072();
  92.     void Test4216742();
  93.     void Test4217661();
  94.     void Test4161100();
  95.     void Test4243011();
  96.     void Test4243108();
  97.  
  98. protected:
  99.     bool_t failure(UErrorCode status, const UnicodeString& msg);
  100. };
  101.  
  102. class MyNumberFormatTest : public NumberFormat 
  103. {
  104. public:
  105.  
  106.     //public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) 
  107.   //{ return new StringBuffer(""); }
  108.   //public StringBuffer format(long number,StringBuffer toAppendTo, FieldPosition pos) 
  109.   //{ return new StringBuffer(""); }
  110.   
  111.   virtual UnicodeString& format(    double            number, 
  112.                     UnicodeString&        toAppendTo, 
  113.                     FieldPosition&        pos) const
  114.     {
  115.       toAppendTo = "";
  116.       return toAppendTo;
  117.     }
  118.   
  119.   
  120.   //public Number parse(String text, ParsePosition parsePosition) 
  121.   //{ return new Integer(0); }
  122.   
  123.   virtual void parse(    const UnicodeString&    text, 
  124.             Formattable&            result, 
  125.             ParsePosition&            parsePosition) const
  126.     {
  127.       result.setLong(0L);
  128.     }
  129.   
  130.   virtual Format* clone() const 
  131.     { return NULL; }
  132.   
  133.   virtual UnicodeString& format(int32_t, 
  134.                 UnicodeString& foo, 
  135.                 FieldPosition&) const
  136.     { return foo.remove(); }
  137. };
  138.  
  139. #endif // _NUMBERFORMATREGRESSIONTEST_
  140. //eof
  141.