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