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) 2002-2006, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************
8 *
9 * @author Mark E. Davis
10 * @author Vladimir Weinstein
11 */
12
13/**
14 * Test Canonical Iterator
15 */
16
17#ifndef _CANITTST
18#define _CANITTST
19
20#include "unicode/utypes.h"
21
22#if !UCONFIG_NO_NORMALIZATION
23
24
25U_NAMESPACE_BEGIN
26
27class Transliterator;
28
29U_NAMESPACE_END
30
31#include "unicode/translit.h"
32#include "unicode/caniter.h"
33#include "intltest.h"
34#include "hash.h"
35
36class CanonicalIteratorTest : public IntlTest {
37public:
38    CanonicalIteratorTest();
39    virtual ~CanonicalIteratorTest();
40
41    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
42
43    void TestCanonicalIterator(void);
44    void TestExhaustive(void);
45    void TestBasic();
46    void TestAPI();
47    UnicodeString collectionToString(Hashtable *col);
48    //static UnicodeString collectionToString(Collection col);
49private:
50    void expectEqual(const UnicodeString &message, const UnicodeString &item, const UnicodeString &a, const UnicodeString &b);
51    void characterTest(UnicodeString &s, UChar32 ch, CanonicalIterator &it);
52
53    Transliterator *nameTrans;
54    Transliterator *hexTrans;
55
56    UnicodeString getReadable(const UnicodeString &obj);
57};
58
59#endif /* #if !UCONFIG_NO_NORMALIZATION */
60
61#endif // _CANITTST
62