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