~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/test/intltest/dacoll.h

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
 * COPYRIGHT: 
 
3
 * Copyright (c) 1997-2001, International Business Machines Corporation and
 
4
 * others. All Rights Reserved.
 
5
 ********************************************************************/
 
6
 
 
7
/**
 
8
 * CollationDanishTest is a third level test class.  This tests the locale
 
9
 * specific primary and tertiary rules.  For example, a-ring sorts after z
 
10
 * and a-umlaut sorts before ae ligatures.  Additional test strings from the
 
11
 * internet are also included.
 
12
 */
 
13
 
 
14
#ifndef _DACOLL
 
15
#define _DACOLL
 
16
 
 
17
#include "tscoll.h"
 
18
 
 
19
class CollationDanishTest: public IntlTestCollator {
 
20
public:
 
21
    // If this is too small for the test data, just increase it.
 
22
    // Just don't make it too large, otherwise the executable will get too big
 
23
    enum EToken_Len { MAX_TOKEN_LEN = 24 };
 
24
 
 
25
    CollationDanishTest();
 
26
    virtual ~CollationDanishTest();
 
27
    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
 
28
 
 
29
    // main test routine, Tests rules specific to danish collation
 
30
    void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
 
31
 
 
32
    // perform tests with strength PRIMARY
 
33
    void TestPrimary(/* char* par */);
 
34
 
 
35
    // perform test with strength TERTIARY
 
36
    void TestTertiary(/* char* par */);
 
37
 
 
38
private:
 
39
    static const UChar testBugs[][MAX_TOKEN_LEN];
 
40
    static const UChar testNTList[][MAX_TOKEN_LEN];
 
41
    static const UChar testSourceCases[][MAX_TOKEN_LEN];
 
42
    static const UChar testTargetCases[][MAX_TOKEN_LEN];
 
43
    static const Collator::EComparisonResult results[];
 
44
 
 
45
    Collator *myCollation;
 
46
};
 
47
#endif