2002-10-22 00:09:32 +00:00
|
|
|
/********************************************************************
|
2007-12-11 21:30:10 +00:00
|
|
|
* COPYRIGHT:
|
2014-05-02 22:51:53 +00:00
|
|
|
* Copyright (c) 2002-2014, International Business Machines Corporation and
|
2002-10-22 00:09:32 +00:00
|
|
|
* 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"
|
|
|
|
|
2010-02-03 03:44:06 +00:00
|
|
|
struct UText;
|
|
|
|
typedef struct UText UText;
|
2002-10-22 00:09:32 +00:00
|
|
|
|
|
|
|
class RegexTest: public IntlTest {
|
|
|
|
public:
|
2007-12-11 21:30:10 +00:00
|
|
|
|
2002-10-22 00:09:32 +00:00
|
|
|
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();
|
2008-06-30 23:53:12 +00:00
|
|
|
virtual void Bug6149();
|
2008-02-20 03:08:44 +00:00
|
|
|
virtual void Callbacks();
|
2010-06-15 20:19:10 +00:00
|
|
|
virtual void FindProgressCallbacks();
|
2010-02-03 03:44:06 +00:00
|
|
|
virtual void UTextBasic();
|
|
|
|
virtual void API_Match_UTF8();
|
|
|
|
virtual void API_Pattern_UTF8();
|
|
|
|
virtual void API_Replace_UTF8();
|
|
|
|
virtual void PerlTestsUTF8();
|
|
|
|
virtual void PreAllocatedUTextCAPI();
|
2010-04-28 03:55:58 +00:00
|
|
|
virtual void Bug7651();
|
2010-06-16 17:54:04 +00:00
|
|
|
virtual void Bug7740();
|
2011-04-21 00:07:50 +00:00
|
|
|
virtual void Bug8479();
|
2011-04-21 23:19:40 +00:00
|
|
|
virtual void Bug7029();
|
2012-04-27 21:29:34 +00:00
|
|
|
virtual void Bug9283();
|
2011-09-15 19:34:17 +00:00
|
|
|
virtual void CheckInvBufSize();
|
2013-10-11 20:59:39 +00:00
|
|
|
virtual void Bug10459();
|
2014-05-02 22:51:53 +00:00
|
|
|
virtual void TestCaseInsensitiveStarters();
|
2014-08-06 21:49:08 +00:00
|
|
|
virtual void TestBug11049();
|
2014-12-02 21:58:18 +00:00
|
|
|
virtual void TestBug11371();
|
2011-09-15 19:34:17 +00:00
|
|
|
|
2002-11-06 02:35:20 +00:00
|
|
|
// The following functions are internal to the regexp tests.
|
2010-02-03 03:44:06 +00:00
|
|
|
virtual void assertUText(const char *expected, UText *actual, const char *file, int line);
|
2010-07-28 16:08:12 +00:00
|
|
|
virtual void assertUTextInvariant(const char *invariant, UText *actual, const char *file, int line);
|
2007-07-16 20:08:07 +00:00
|
|
|
virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int32_t line);
|
2010-02-03 03:44:06 +00:00
|
|
|
virtual UBool doRegexLMTestUTF8(const char *pat, const char *text, UBool looking, UBool match, int32_t line);
|
2003-02-06 01:55:17 +00:00
|
|
|
virtual void regex_find(const UnicodeString &pat, const UnicodeString &flags,
|
2010-07-28 16:08:12 +00:00
|
|
|
const UnicodeString &input, const char *srcPath, int32_t line);
|
2002-11-06 02:35:20 +00:00
|
|
|
virtual void regex_err(const char *pat, int32_t errline, int32_t errcol,
|
2007-07-16 20:08:07 +00:00
|
|
|
UErrorCode expectedStatus, int32_t line);
|
2007-12-11 21:30:10 +00:00
|
|
|
virtual UChar *ReadAndConvertFile(const char *fileName, int32_t &len, const char *charset, UErrorCode &status);
|
2003-07-02 17:26:20 +00:00
|
|
|
virtual const char *getPath(char buffer[2048], const char *filename);
|
|
|
|
|
2014-08-14 17:44:05 +00:00
|
|
|
virtual void TestCase11049(const char *pattern, const char *data, UBool expectMatch, int32_t lineNumber);
|
|
|
|
|
2011-10-12 20:08:09 +00:00
|
|
|
static const char* extractToAssertBuf(const UnicodeString& message);
|
|
|
|
|
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
|