]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/thcoll.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 **********************************************************************
5 * Copyright (C) 1999-2003, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * Date Name Description
9 * 12/09/99 aliu Ported from Java.
10 **********************************************************************
13 #ifndef COLLATIONTHAITEST_H
14 #define COLLATIONTHAITEST_H
16 #include "unicode/utypes.h"
18 #if !UCONFIG_NO_COLLATION
22 class CollationThaiTest
: public IntlTestCollator
{
23 Collator
* coll
; // Thai collator
28 virtual ~CollationThaiTest();
30 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
35 * Read the external dictionary file, which is already in proper
36 * sorted order, and confirm that the collator compares each line as
37 * preceding the following line.
39 void TestDictionary(void);
42 * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort",
43 * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip
45 void TestCornerCases(void);
48 * Read the external names list, and confirms that the collator
49 * gets the same results when comparing lines one to another
50 * using regular and iterative comparison.
52 void TestNamesList(void);
55 * test that invalid Thai sorts properly
57 void TestInvalidThai(void);
60 * test that reording is done properly
62 void TestReordering(void);
66 void compareArray(Collator
& c
, const char* tests
[],
69 int8_t sign(int32_t i
);
72 * Set a UnicodeString corresponding to the given string. Use
73 * UnicodeString and the default converter, unless we see the sequence
74 * "\\u", in which case we interpret the subsequent escape.
76 UnicodeString
& parseChars(UnicodeString
& result
,
80 #endif /* #if !UCONFIG_NO_COLLATION */