Home | History | Annotate | Download | only in intltest
      1 /********************************************************************
      2  * COPYRIGHT:
      3  * Copyright (c) 1997-2012, 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     void testOrdinal();
     32 
     33     void assertRuleValue(const UnicodeString& rule, double expected);
     34     void assertRuleKeyValue(const UnicodeString& rule, const UnicodeString& key,
     35                             double expected);
     36 };
     37 
     38 #endif /* #if !UCONFIG_NO_FORMATTING */
     39 
     40 #endif
     41