]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/regextst.h
ICU-551.51.tar.gz
[apple/icu.git] / icuSources / test / intltest / regextst.h
CommitLineData
b75a7d8f 1/********************************************************************
46f4442e 2 * COPYRIGHT:
b331163b 3 * Copyright (c) 2002-2015, International Business Machines Corporation and
b75a7d8f
A
4 * others. All Rights Reserved.
5 ********************************************************************/
6
7
8#ifndef REGEXTST_H
9#define REGEXTST_H
10
11#include "unicode/utypes.h"
12#if !UCONFIG_NO_REGULAR_EXPRESSIONS
13
14#include "intltest.h"
b75a7d8f 15
729e4ab9
A
16struct UText;
17typedef struct UText UText;
b75a7d8f
A
18
19class RegexTest: public IntlTest {
20public:
46f4442e 21
b75a7d8f
A
22 RegexTest();
23 virtual ~RegexTest();
24
25 virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
26
27 // The following are test functions that are visible from the intltest test framework.
28 virtual void API_Match();
29 virtual void API_Pattern();
30 virtual void API_Replace();
31 virtual void Basic();
32 virtual void Extended();
33 virtual void Errors();
34 virtual void PerlTests();
729e4ab9 35 virtual void Bug6149();
46f4442e 36 virtual void Callbacks();
729e4ab9
A
37 virtual void FindProgressCallbacks();
38 virtual void UTextBasic();
39 virtual void API_Match_UTF8();
40 virtual void API_Pattern_UTF8();
41 virtual void API_Replace_UTF8();
42 virtual void PerlTestsUTF8();
43 virtual void PreAllocatedUTextCAPI();
b331163b
A
44 virtual void NamedCapture();
45 virtual void NamedCaptureLimits();
729e4ab9
A
46 virtual void Bug7651();
47 virtual void Bug7740();
4388f060
A
48 virtual void Bug8479();
49 virtual void Bug7029();
50 virtual void Bug9283();
51 virtual void CheckInvBufSize();
57a6839d 52 virtual void Bug10459();
b331163b
A
53 virtual void TestCaseInsensitiveStarters();
54 virtual void TestBug11049();
55 virtual void TestBug11371();
56 virtual void TestBug11480();
4388f060 57
b75a7d8f 58 // The following functions are internal to the regexp tests.
729e4ab9
A
59 virtual void assertUText(const char *expected, UText *actual, const char *file, int line);
60 virtual void assertUTextInvariant(const char *invariant, UText *actual, const char *file, int line);
46f4442e 61 virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int32_t line);
729e4ab9 62 virtual UBool doRegexLMTestUTF8(const char *pat, const char *text, UBool looking, UBool match, int32_t line);
b75a7d8f 63 virtual void regex_find(const UnicodeString &pat, const UnicodeString &flags,
729e4ab9 64 const UnicodeString &input, const char *srcPath, int32_t line);
b75a7d8f 65 virtual void regex_err(const char *pat, int32_t errline, int32_t errcol,
46f4442e
A
66 UErrorCode expectedStatus, int32_t line);
67 virtual UChar *ReadAndConvertFile(const char *fileName, int32_t &len, const char *charset, UErrorCode &status);
374ca955
A
68 virtual const char *getPath(char buffer[2048], const char *filename);
69
b331163b
A
70 virtual void TestCase11049(const char *pattern, const char *data, UBool expectMatch, int32_t lineNumber);
71
4388f060
A
72 static const char* extractToAssertBuf(const UnicodeString& message);
73
b75a7d8f
A
74};
75
76#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
77#endif