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