]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/thcoll.h
2 **********************************************************************
3 * Copyright (C) 1999-2003, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Date Name Description
7 * 12/09/99 aliu Ported from Java.
8 **********************************************************************
11 #ifndef COLLATIONTHAITEST_H
12 #define COLLATIONTHAITEST_H
14 #include "unicode/utypes.h"
16 #if !UCONFIG_NO_COLLATION
20 class CollationThaiTest
: public IntlTestCollator
{
21 Collator
* coll
; // Thai collator
26 virtual ~CollationThaiTest();
28 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
33 * Read the external dictionary file, which is already in proper
34 * sorted order, and confirm that the collator compares each line as
35 * preceding the following line.
37 void TestDictionary(void);
40 * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort",
41 * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip
43 void TestCornerCases(void);
46 * Read the external names list, and confirms that the collator
47 * gets the same results when comparing lines one to another
48 * using regular and iterative comparison.
50 void TestNamesList(void);
53 * test that invalid Thai sorts properly
55 void TestInvalidThai(void);
58 * test that reording is done properly
60 void TestReordering(void);
64 void compareArray(Collator
& c
, const char* tests
[],
67 int8_t sign(int32_t i
);
70 * Set a UnicodeString corresponding to the given string. Use
71 * UnicodeString and the default converter, unless we see the sequence
72 * "\\u", in which case we interpret the subsequent escape.
74 UnicodeString
& parseChars(UnicodeString
& result
,
78 #endif /* #if !UCONFIG_NO_COLLATION */