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

« back to all changes in this revision

Viewing changes to source/test/intltest/srchtest.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) 2001, International Business Machines Corporation and others
4
 
 * All Rights Reserved.
5
 
 ***************************************************************************/
6
 
 
7
 
#ifndef _STRSRCH_H
8
 
#define _STRSRCH_H
9
 
 
10
 
#include "unicode/tblcoll.h"
11
 
#include "unicode/brkiter.h"
12
 
#include "intltest.h"
13
 
#include "unicode/usearch.h"
14
 
 
15
 
struct SearchData;
16
 
typedef struct SearchData SearchData;
17
 
 
18
 
class StringSearchTest: public IntlTest 
19
 
{
20
 
public:
21
 
    StringSearchTest();
22
 
    virtual ~StringSearchTest();
23
 
 
24
 
    void runIndexedTest(int32_t index, UBool exec, const char* &name, 
25
 
                        char* par = NULL);
26
 
 
27
 
private:
28
 
    RuleBasedCollator *m_en_us_; 
29
 
    RuleBasedCollator *m_fr_fr_;
30
 
    RuleBasedCollator *m_de_;
31
 
    RuleBasedCollator *m_es_;
32
 
    BreakIterator     *m_en_wordbreaker_;
33
 
    BreakIterator     *m_en_characterbreaker_;
34
 
 
35
 
    RuleBasedCollator * getCollator(const char *collator);
36
 
    BreakIterator     * getBreakIterator(const char *breaker);
37
 
    char              * toCharString(const UnicodeString &text);
38
 
    Collator::ECollationStrength getECollationStrength(
39
 
                                   const UCollationStrength &strength) const;
40
 
    UBool           assertEqualWithStringSearch(      StringSearch *strsrch,
41
 
                                                const SearchData   *search);
42
 
    UBool           assertEqual(const SearchData *search);
43
 
    UBool           assertCanonicalEqual(const SearchData *search);
44
 
    UBool           assertEqualWithAttribute(const SearchData *search, 
45
 
                                            USearchAttributeValue canonical,
46
 
                                            USearchAttributeValue overlap);
47
 
    void TestOpenClose();
48
 
    void TestInitialization();
49
 
    void TestBasic();
50
 
    void TestNormExact();
51
 
    void TestStrength();
52
 
    void TestBreakIterator();
53
 
    void TestVariable();
54
 
    void TestOverlap();
55
 
    void TestCollator();
56
 
    void TestPattern();
57
 
    void TestText();
58
 
    void TestCompositeBoundaries();
59
 
    void TestGetSetOffset();
60
 
    void TestGetSetAttribute();
61
 
    void TestGetMatch();
62
 
    void TestSetMatch();
63
 
    void TestReset();
64
 
    void TestSupplementary();
65
 
    void TestContraction();
66
 
    void TestIgnorable();
67
 
    void TestCanonical();
68
 
    void TestNormCanonical();
69
 
    void TestStrengthCanonical();
70
 
    void TestBreakIteratorCanonical();
71
 
    void TestVariableCanonical();
72
 
    void TestOverlapCanonical();
73
 
    void TestCollatorCanonical();
74
 
    void TestPatternCanonical();
75
 
    void TestTextCanonical();
76
 
    void TestCompositeBoundariesCanonical();
77
 
    void TestGetSetOffsetCanonical();
78
 
    void TestSupplementaryCanonical();
79
 
    void TestContractionCanonical();
80
 
    void TestSearchIterator();
81
 
};
82
 
 
83
 
#endif