Home | History | Annotate | Download | only in intltest
      1 /***************************************************************************
      2 *
      3 *   Copyright (C) 2000-2007, International Business Machines
      4 *   Corporation and others.  All Rights Reserved.
      5 *
      6 ************************************************************************
      7 *   Date        Name        Description
      8 *   01/03/2000  Madhu        Creation.
      9 *   03/2000     Madhu        Added additional tests
     10 ***********************************************************************/
     11 /**
     12  * IntlTestTransliterator is the medium level test class for Transliterator
     13  */
     14 
     15 #include "unicode/utypes.h"
     16 
     17 #if !UCONFIG_NO_TRANSLITERATION
     18 
     19 #include "ittrans.h"
     20 #include "transtst.h"
     21 #include "transapi.h"
     22 #include "cpdtrtst.h"
     23 #include "transrt.h"
     24 #include "jamotest.h"
     25 #include "trnserr.h"
     26 #include "reptest.h"
     27 
     28 #define CASE(id,test) case id:                                \
     29                           name = #test;                       \
     30                           if (exec) {                         \
     31                               logln(#test "---"); logln();    \
     32                               test t;                         \
     33                               callTest(t, par);               \
     34                           }                                   \
     35                           break
     36 
     37 void IntlTestTransliterator::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
     38 {
     39     if (exec) logln("TestSuite Transliterator");
     40     switch (index) {
     41         CASE(0, TransliteratorTest);
     42         CASE(1, TransliteratorAPITest);
     43         CASE(2, CompoundTransliteratorTest);
     44         CASE(3, TransliteratorRoundTripTest);
     45         CASE(4, JamoTest);
     46         CASE(5, TransliteratorErrorTest);
     47         CASE(6, ReplaceableTest);
     48 #if !UCONFIG_NO_TRANSLITERATION && defined(U_USE_UNICODE_FILTER_LOGIC_OBSOLETE_2_8)
     49         CASE(7, UnicodeFilterLogicTest);
     50 #endif
     51 
     52         default: name=""; break;
     53     }
     54 }
     55 
     56 #endif /* #if !UCONFIG_NO_TRANSLITERATION */
     57