12e5b6d6dSopenharmony_ci// © 2016 and later: Unicode, Inc. and others. 22e5b6d6dSopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html 32e5b6d6dSopenharmony_ci/******************************************************************** 42e5b6d6dSopenharmony_ci * COPYRIGHT: 52e5b6d6dSopenharmony_ci * Copyright (c) 2002-2015, International Business Machines Corporation and 62e5b6d6dSopenharmony_ci * others. All Rights Reserved. 72e5b6d6dSopenharmony_ci ********************************************************************/ 82e5b6d6dSopenharmony_ci 92e5b6d6dSopenharmony_ci 102e5b6d6dSopenharmony_ci#ifndef REGEXTST_H 112e5b6d6dSopenharmony_ci#define REGEXTST_H 122e5b6d6dSopenharmony_ci 132e5b6d6dSopenharmony_ci#include "unicode/utypes.h" 142e5b6d6dSopenharmony_ci#if !UCONFIG_NO_REGULAR_EXPRESSIONS 152e5b6d6dSopenharmony_ci 162e5b6d6dSopenharmony_ci#include "intltest.h" 172e5b6d6dSopenharmony_ci 182e5b6d6dSopenharmony_cistruct UText; 192e5b6d6dSopenharmony_citypedef struct UText UText; 202e5b6d6dSopenharmony_ci 212e5b6d6dSopenharmony_ciclass RegexTest: public IntlTest { 222e5b6d6dSopenharmony_cipublic: 232e5b6d6dSopenharmony_ci 242e5b6d6dSopenharmony_ci RegexTest(); 252e5b6d6dSopenharmony_ci virtual ~RegexTest(); 262e5b6d6dSopenharmony_ci 272e5b6d6dSopenharmony_ci virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override; 282e5b6d6dSopenharmony_ci 292e5b6d6dSopenharmony_ci // The following are test functions that are visible from the intltest test framework. 302e5b6d6dSopenharmony_ci virtual void API_Match(); 312e5b6d6dSopenharmony_ci virtual void API_Pattern(); 322e5b6d6dSopenharmony_ci virtual void API_Replace(); 332e5b6d6dSopenharmony_ci virtual void Basic(); 342e5b6d6dSopenharmony_ci virtual void Extended(); 352e5b6d6dSopenharmony_ci virtual void Errors(); 362e5b6d6dSopenharmony_ci virtual void PerlTests(); 372e5b6d6dSopenharmony_ci virtual void Bug6149(); 382e5b6d6dSopenharmony_ci virtual void Callbacks(); 392e5b6d6dSopenharmony_ci virtual void FindProgressCallbacks(); 402e5b6d6dSopenharmony_ci virtual void UTextBasic(); 412e5b6d6dSopenharmony_ci virtual void API_Match_UTF8(); 422e5b6d6dSopenharmony_ci virtual void API_Pattern_UTF8(); 432e5b6d6dSopenharmony_ci virtual void API_Replace_UTF8(); 442e5b6d6dSopenharmony_ci virtual void PerlTestsUTF8(); 452e5b6d6dSopenharmony_ci virtual void PreAllocatedUTextCAPI(); 462e5b6d6dSopenharmony_ci virtual void NamedCapture(); 472e5b6d6dSopenharmony_ci virtual void NamedCaptureLimits(); 482e5b6d6dSopenharmony_ci virtual void Bug7651(); 492e5b6d6dSopenharmony_ci virtual void Bug7740(); 502e5b6d6dSopenharmony_ci virtual void Bug8479(); 512e5b6d6dSopenharmony_ci virtual void Bug7029(); 522e5b6d6dSopenharmony_ci virtual void Bug9283(); 532e5b6d6dSopenharmony_ci virtual void CheckInvBufSize(); 542e5b6d6dSopenharmony_ci virtual void Bug10459(); 552e5b6d6dSopenharmony_ci virtual void TestCaseInsensitiveStarters(); 562e5b6d6dSopenharmony_ci virtual void TestBug11049(); 572e5b6d6dSopenharmony_ci virtual void TestBug11371(); 582e5b6d6dSopenharmony_ci virtual void TestBug11480(); 592e5b6d6dSopenharmony_ci virtual void TestBug12884(); 602e5b6d6dSopenharmony_ci virtual void TestBug13631(); 612e5b6d6dSopenharmony_ci virtual void TestBug13632(); 622e5b6d6dSopenharmony_ci virtual void TestBug20359(); 632e5b6d6dSopenharmony_ci virtual void TestBug20863(); 642e5b6d6dSopenharmony_ci 652e5b6d6dSopenharmony_ci // The following functions are internal to the regexp tests. 662e5b6d6dSopenharmony_ci virtual void assertUText(const char *expected, UText *actual, const char *file, int line); 672e5b6d6dSopenharmony_ci virtual void assertUTextInvariant(const char *invariant, UText *actual, const char *file, int line); 682e5b6d6dSopenharmony_ci virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int32_t line); 692e5b6d6dSopenharmony_ci virtual UBool doRegexLMTestUTF8(const char *pat, const char *text, UBool looking, UBool match, int32_t line); 702e5b6d6dSopenharmony_ci virtual void regex_find(const UnicodeString &pat, const UnicodeString &flags, 712e5b6d6dSopenharmony_ci const UnicodeString &input, const char *srcPath, int32_t line); 722e5b6d6dSopenharmony_ci virtual void regex_err(const char *pat, int32_t errline, int32_t errcol, 732e5b6d6dSopenharmony_ci UErrorCode expectedStatus, int32_t line); 742e5b6d6dSopenharmony_ci virtual const char *getPath(char buffer[2048], const char *filename); 752e5b6d6dSopenharmony_ci 762e5b6d6dSopenharmony_ci virtual void TestCase11049(const char *pattern, const char *data, UBool expectMatch, int32_t lineNumber); 772e5b6d6dSopenharmony_ci 782e5b6d6dSopenharmony_ci static const char* extractToAssertBuf(const UnicodeString& message); 792e5b6d6dSopenharmony_ci 802e5b6d6dSopenharmony_ci}; 812e5b6d6dSopenharmony_ci 822e5b6d6dSopenharmony_ci#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS 832e5b6d6dSopenharmony_ci#endif 84