1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 4 /******************************************************************** 5 * COPYRIGHT: 6 * Copyright (c) 1997-2003, International Business Machines Corporation and 7 * others. All Rights Reserved. 8 ********************************************************************/ 9 /*********************************************************************** 10 ************************************************************************ 11 * Date Name Description 12 * 03/09/2000 Madhu Creation. 13 ************************************************************************/ 14 15 #ifndef CPDTRTST_H 16 #define CPDTRTST_H 17 18 #include "unicode/utypes.h" 19 20 #if !UCONFIG_NO_TRANSLITERATION 21 22 #include "unicode/translit.h" 23 #include "cpdtrans.h" 24 #include "intltest.h" 25 26 /** 27 * @test 28 * @summary General test of Compound Transliterator 29 */ 30 class CompoundTransliteratorTest : public IntlTest { 31 public: 32 void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override; 33 34 /*Tests the constructors */ 35 void TestConstruction(void); 36 /*Tests the function clone, and operator==()*/ 37 void TestCloneEqual(void); 38 /*Tests the function getCount()*/ 39 void TestGetCount(void); 40 /*Tests the function getTransliterator() and setTransliterators() and adoptTransliterators()*/ 41 void TestGetSetAdoptTransliterator(void); 42 /*Tests the function handleTransliterate()*/ 43 void TestTransliterate(void); 44 45 //====================================================================== 46 // Support methods 47 //====================================================================== 48 49 /** 50 * Splits a UnicodeString 51 */ 52 UnicodeString* split(const UnicodeString& str, UChar seperator, int32_t& count); 53 54 void expect(const CompoundTransliterator& t, 55 const UnicodeString& source, 56 const UnicodeString& expectedResult); 57 58 void expectAux(const UnicodeString& tag, 59 const UnicodeString& summary, UBool pass, 60 const UnicodeString& expectedResult); 61 62 63 }; 64 65 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ 66 67 #endif 68