1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
**********************************************************************
* Copyright (C) 2005-2009, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
#ifndef __SSEARCH_H
#define __SSEARCH_H
#include "unicode/utypes.h"
#include "unicode/unistr.h"
#include "unicode/ucol.h"
#include "unicode/bmsearch.h"
#include "intltest.h"
#if !UCONFIG_NO_COLLATION
//
// Test of the function usearch_search()
//
// See srchtest.h for the tests for the rest of the string search functions.
//
class SSearchTest: public IntlTest {
public:
SSearchTest();
virtual ~SSearchTest();
virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* params = NULL );
#if !UCONFIG_NO_BREAK_ITERATION
virtual void searchTest();
virtual void offsetTest();
virtual void monkeyTest(char *params);
virtual void bmMonkeyTest(char *params);
virtual void boyerMooreTest();
virtual void goodSuffixTest();
virtual void searchTime();
virtual void bmsTest();
virtual void bmSearchTest();
virtual void udhrTest();
virtual void stringListTest();
private:
virtual const char *getPath(char buffer[2048], const char *filename);
virtual int32_t monkeyTestCase(UCollator *coll, const UnicodeString &testCase, const UnicodeString &pattern, const UnicodeString &altPattern,
const char *name, const char *strength, uint32_t seed);
virtual int32_t bmMonkeyTestCase(UCollator *coll, const UnicodeString &testCase, const UnicodeString &pattern, const UnicodeString &altPattern,
BoyerMooreSearch *bms, BoyerMooreSearch *abms,
const char *name, const char *strength, uint32_t seed);
#endif
};
#endif
#endif
|