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