diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-01-29 01:28:52 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-01-29 01:28:52 +0000 |
commit | c946ae60194727ede9d3ef44754839f48541a981 (patch) | |
tree | 97556ae9a1a32035b8db8b9bfc87b109ad4e39e2 /src/gtest-internal-inl.h | |
parent | a32fc79c9af648cd500f9850975d04ae49ebda3f (diff) | |
download | googletest-c946ae60194727ede9d3ef44754839f48541a981.tar.gz googletest-c946ae60194727ede9d3ef44754839f48541a981.tar.bz2 googletest-c946ae60194727ede9d3ef44754839f48541a981.zip |
Implements a simple regex matcher (to be used by death tests on Windows).
Diffstat (limited to 'src/gtest-internal-inl.h')
-rw-r--r-- | src/gtest-internal-inl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gtest-internal-inl.h b/src/gtest-internal-inl.h index 28006a2f..caa0877c 100644 --- a/src/gtest-internal-inl.h +++ b/src/gtest-internal-inl.h @@ -1266,6 +1266,22 @@ inline UnitTestImpl* GetUnitTestImpl() { return UnitTest::GetInstance()->impl(); } +// Internal helper functions for implementing the simple regular +// expression matcher. +bool IsInSet(char ch, const char* str); +bool IsDigit(char ch); +bool IsPunct(char ch); +bool IsRepeat(char ch); +bool IsWhiteSpace(char ch); +bool IsWordChar(char ch); +bool IsValidEscape(char ch); +bool AtomMatchesChar(bool escaped, char pattern, char ch); +bool ValidateRegex(const char* regex); +bool MatchRegexAtHead(const char* regex, const char* str); +bool MatchRepetitionAndRegexAtHead( + bool escaped, char ch, char repeat, const char* regex, const char* str); +bool MatchRegexAnywhere(const char* regex, const char* str); + // Parses the command line for Google Test flags, without initializing // other parts of Google Test. void ParseGoogleTestFlagsOnly(int* argc, char** argv); |