2017-01-20 00:20:31 +00:00
|
|
|
// © 2016 and later: Unicode, Inc. and others.
|
2016-06-15 18:58:17 +00:00
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
2001-03-21 20:09:56 +00:00
|
|
|
|
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (c) 1997-2003, International Business Machines Corporation and
|
|
|
|
* others. All Rights Reserved.
|
2001-03-21 20:09:56 +00:00
|
|
|
********************************************************************/
|
|
|
|
/***********************************************************************
|
2000-03-28 23:23:48 +00:00
|
|
|
************************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 03/09/2000 Madhu Creation.
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CPDTRTST_H
|
|
|
|
#define CPDTRTST_H
|
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_TRANSLITERATION
|
|
|
|
|
2000-03-28 23:23:48 +00:00
|
|
|
#include "unicode/translit.h"
|
|
|
|
#include "intltest.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @summary General test of Compound Transliterator
|
|
|
|
*/
|
|
|
|
class CompoundTransliteratorTest : public IntlTest {
|
|
|
|
public:
|
2000-08-14 21:42:36 +00:00
|
|
|
void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
|
2000-03-28 23:23:48 +00:00
|
|
|
|
|
|
|
/*Tests the constructors */
|
|
|
|
void TestConstruction(void);
|
2000-08-14 21:42:36 +00:00
|
|
|
/*Tests the function clone, and operator==()*/
|
|
|
|
void TestCloneEqual(void);
|
2000-03-28 23:23:48 +00:00
|
|
|
/*Tests the function getCount()*/
|
2000-08-14 21:42:36 +00:00
|
|
|
void TestGetCount(void);
|
|
|
|
/*Tests the function getTransliterator() and setTransliterators() and adoptTransliterators()*/
|
|
|
|
void TestGetSetAdoptTransliterator(void);
|
2000-03-28 23:23:48 +00:00
|
|
|
/*Tests the function handleTransliterate()*/
|
2000-08-14 21:42:36 +00:00
|
|
|
void TestTransliterate(void);
|
|
|
|
|
2000-03-28 23:23:48 +00:00
|
|
|
//======================================================================
|
|
|
|
// Support methods
|
|
|
|
//======================================================================
|
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
/**
|
|
|
|
* Splits a UnicodeString
|
|
|
|
*/
|
2000-03-29 23:14:39 +00:00
|
|
|
UnicodeString* split(const UnicodeString& str, UChar seperator, int32_t& count);
|
2000-08-14 21:42:36 +00:00
|
|
|
|
2000-03-28 23:23:48 +00:00
|
|
|
void expect(const CompoundTransliterator& t,
|
|
|
|
const UnicodeString& source,
|
|
|
|
const UnicodeString& expectedResult);
|
2000-08-14 21:42:36 +00:00
|
|
|
|
2000-03-28 23:23:48 +00:00
|
|
|
void expectAux(const UnicodeString& tag,
|
2000-05-18 22:08:39 +00:00
|
|
|
const UnicodeString& summary, UBool pass,
|
2000-03-28 23:23:48 +00:00
|
|
|
const UnicodeString& expectedResult);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
|
2000-03-28 23:23:48 +00:00
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#endif
|