2002-10-22 00:09:32 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
|
|
|
* Copyright (c) 2002, International Business Machines Corporation and
|
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef REGEXTST_H
|
|
|
|
#define REGEXTST_H
|
|
|
|
|
2002-11-07 02:34:46 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#if !UCONFIG_NO_REGULAR_EXPRESSIONS
|
2002-10-22 00:09:32 +00:00
|
|
|
|
|
|
|
#include "intltest.h"
|
|
|
|
#include "unicode/regex.h"
|
|
|
|
|
|
|
|
|
|
|
|
class RegexTest: public IntlTest {
|
|
|
|
public:
|
|
|
|
|
|
|
|
RegexTest();
|
|
|
|
virtual ~RegexTest();
|
|
|
|
|
|
|
|
virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
|
|
|
|
|
2002-11-06 02:35:20 +00:00
|
|
|
// The following are test functions that are visible from the intltest test framework.
|
2002-10-23 01:14:17 +00:00
|
|
|
virtual void API_Match();
|
|
|
|
virtual void API_Pattern();
|
|
|
|
virtual void API_Replace();
|
|
|
|
virtual void Basic();
|
2002-10-28 17:18:44 +00:00
|
|
|
virtual void Extended();
|
2002-11-06 02:35:20 +00:00
|
|
|
virtual void Errors();
|
2003-01-24 02:05:03 +00:00
|
|
|
virtual void PerlTests();
|
2002-10-23 01:14:17 +00:00
|
|
|
|
2002-11-06 02:35:20 +00:00
|
|
|
// The following functions are internal to the regexp tests.
|
2002-11-04 19:35:22 +00:00
|
|
|
virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int line);
|
|
|
|
virtual void regex_find(const char *pat, const char *input, UErrorCode expectedStatus, int line);
|
2002-11-06 02:35:20 +00:00
|
|
|
virtual void regex_err(const char *pat, int32_t errline, int32_t errcol,
|
|
|
|
UErrorCode expectedStatus, int line);
|
2003-01-24 02:05:03 +00:00
|
|
|
virtual UChar *ReadAndConvertFile(const char *fileName, int &len, UErrorCode &status);
|
2002-10-22 00:09:32 +00:00
|
|
|
};
|
2002-11-07 02:34:46 +00:00
|
|
|
|
|
|
|
#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
|
2002-10-22 00:09:32 +00:00
|
|
|
#endif
|