• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  **********************************************************************
5  *   Copyright (C) 2005-2012, International Business Machines
6  *   Corporation and others.  All Rights Reserved.
7  **********************************************************************
8  */
9 
10 #ifndef __SSEARCH_H
11 #define __SSEARCH_H
12 
13 #include "unicode/utypes.h"
14 #include "unicode/unistr.h"
15 #include "unicode/ucol.h"
16 
17 #include "intltest.h"
18 
19 #if !UCONFIG_NO_COLLATION
20 
21 //
22 //  Test of the function usearch_search()
23 //
24 //     See srchtest.h for the tests for the rest of the string search functions.
25 //
26 class SSearchTest: public IntlTest {
27 public:
28 
29     SSearchTest();
30     virtual ~SSearchTest();
31 
32     virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* params = NULL ) override;
33 #if !UCONFIG_NO_BREAK_ITERATION
34 
35     virtual void searchTest();
36     virtual void offsetTest();
37     virtual void monkeyTest(char *params);
38     virtual void sharpSTest();
39     virtual void goodSuffixTest();
40     virtual void searchTime();
41 
42 private:
43     virtual const char   *getPath(char buffer[2048], const char *filename);
44     virtual       int32_t monkeyTestCase(UCollator *coll, const UnicodeString &testCase, const UnicodeString &pattern, const UnicodeString &altPattern,
45                                          const char *name, const char *strength, uint32_t seed);
46 #endif
47 };
48 
49 #endif
50 
51 #endif
52