1 /******************************************************************** 2 * COPYRIGHT: 3 * Copyright (c) 1997-2001, International Business Machines Corporation and 4 * others. All Rights Reserved. 5 ******************************************************************** 6 ************************************************************************ 7 * Date Name Description 8 * 02/28/2001 aliu Creation 9 * 03/01/2001 George port to HP/UX 10 ************************************************************************/ 11 12 #ifndef JAMOTEST_H 13 #define JAMOTEST_H 14 15 #include "unicode/utypes.h" 16 17 #if !UCONFIG_NO_TRANSLITERATION 18 19 #include "unicode/translit.h" 20 #include "transtst.h" 21 22 /** 23 * @test 24 * @summary Test of Latin-Jamo and Jamo-Latin rules 25 */ 26 class JamoTest : public TransliteratorTest { 27 public: 28 JamoTest(); 29 virtual ~JamoTest(); 30 private: 31 void runIndexedTest(int32_t index, UBool exec, const char* &name, 32 char* par=NULL); 33 34 void TestJamo(void); 35 36 void TestRealText(void); 37 38 void TestPiecemeal(void); 39 40 //====================================================================== 41 // Support methods 42 //====================================================================== 43 44 // Override TransliteratorTest 45 virtual void expectAux(const UnicodeString& tag, 46 const UnicodeString& summary, UBool pass, 47 const UnicodeString& expectedResult); 48 49 // Methods to convert Jamo to/from readable short names, 50 // e.g. (Gi) <> U+1100 51 static const char* JAMO_NAMES_RULES; 52 Transliterator *JAMO_NAME; 53 Transliterator *NAME_JAMO; 54 UnicodeString nameToJamo(const UnicodeString& input); 55 UnicodeString jamoToName(const UnicodeString& input); 56 }; 57 58 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ 59 60 #endif 61