mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-26 14:35:38 +02:00
Fixes #1766: Catch terminates when parsing invalid test name
This commit is contained in:

committed by
Jozef Grajciar

parent
01ef7076f5
commit
84856844e1
@@ -41,7 +41,7 @@ namespace Catch {
|
||||
TestSpec testSpec();
|
||||
|
||||
private:
|
||||
void visitChar( char c );
|
||||
bool visitChar( char c );
|
||||
void startNewMode( Mode mode );
|
||||
bool processNoneChar( char c );
|
||||
void processNameChar( char c );
|
||||
@@ -51,6 +51,8 @@ namespace Catch {
|
||||
bool isControlChar( char c ) const;
|
||||
void saveLastMode();
|
||||
void revertBackToLastMode();
|
||||
void addFilter();
|
||||
bool separate();
|
||||
|
||||
template<typename T>
|
||||
void addPattern() {
|
||||
@@ -73,8 +75,13 @@ namespace Catch {
|
||||
m_exclusion = false;
|
||||
m_mode = None;
|
||||
}
|
||||
|
||||
void addFilter();
|
||||
|
||||
inline void addCharToPattern(char c) {
|
||||
m_substring += c;
|
||||
m_patternName += c;
|
||||
m_realPatternPos++;
|
||||
}
|
||||
|
||||
};
|
||||
TestSpec parseTestSpec( std::string const& arg );
|
||||
|
||||
|
Reference in New Issue
Block a user