Home | History | Annotate | Download | only in intltest
      1 /********************************************************************
      2  * COPYRIGHT:
      3  * Copyright (c) 1997-2011, International Business Machines Corporation and
      4  * others. All Rights Reserved.
      5  ********************************************************************/
      6 
      7 #ifndef _PluralRulesTest
      8 #define _PluralRulesTest
      9 
     10 #include "unicode/utypes.h"
     11 
     12 #if !UCONFIG_NO_FORMATTING
     13 
     14 #include "intltest.h"
     15 
     16 /**
     17  * Test basic functionality of various API functions
     18  **/
     19 class PluralRulesTest : public IntlTest {
     20     void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
     21 
     22 private:
     23     /**
     24      * Performs tests on many API functions, see detailed comments in source code
     25      **/
     26     void testAPI();
     27     void testGetUniqueKeywordValue();
     28     void testGetSamples();
     29     void testWithin();
     30     void testGetAllKeywordValues();
     31 
     32     void assertRuleValue(const UnicodeString& rule, double expected);
     33     void assertRuleKeyValue(const UnicodeString& rule, const UnicodeString& key,
     34                             double expected);
     35 };
     36 
     37 #endif /* #if !UCONFIG_NO_FORMATTING */
     38 
     39 #endif
     40