~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

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
 
 * CollationEnglishTest is a third level test class.  This tests the locale
9
 
 * specific primary, secondary and tertiary rules.  For example, the ignorable
10
 
 * character '-' in string "black-bird".  The en_US locale uses the default
11
 
 * collation rules as its sorting sequence.
12
 
 */
13
 
 
14
 
#ifndef _ENCOLL
15
 
#define _ENCOLL
16
 
 
17
 
#include "tscoll.h"
18
 
 
19
 
class CollationEnglishTest: 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 = 16 };
24
 
 
25
 
    CollationEnglishTest();
26
 
    virtual ~CollationEnglishTest();
27
 
    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
28
 
 
29
 
    // main test routine, tests rules defined by the "en" locale
30
 
    void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
31
 
 
32
 
    // performs test with strength PRIMARY
33
 
    void TestPrimary(/* char* par */);
34
 
 
35
 
    // perform test with strength SECONDARY
36
 
    void TestSecondary(/* char* par */);
37
 
 
38
 
    // perform test with strength TERTIARY
39
 
    void TestTertiary(/* char* par */);
40
 
 
41
 
private:
42
 
    static const UChar testBugs[][MAX_TOKEN_LEN];
43
 
    static const UChar testSourceCases[][MAX_TOKEN_LEN];
44
 
    static const UChar testTargetCases[][MAX_TOKEN_LEN];
45
 
    static const Collator::EComparisonResult results[];
46
 
    static const UChar testAcute[][MAX_TOKEN_LEN];
47
 
 
48
 
    Collator *myCollation;
49
 
};
50
 
#endif