mirror of
https://github.com/google/googletest.git
synced 2025-01-15 00:47:54 +08:00
Reimplement MatchesFilter with new interfaces.
This commit is contained in:
parent
3fc1ab6632
commit
d03d23a6e5
@ -390,6 +390,10 @@ class GTEST_API_ UnitTestOptions {
|
||||
// This function is useful as an __except condition.
|
||||
static int GTestShouldProcessSEH(DWORD exception_code);
|
||||
#endif // GTEST_OS_WINDOWS
|
||||
|
||||
// Returns true if "name" matches the ':' separated list of glob-style
|
||||
// filters in "filter".
|
||||
static bool MatchesFilter(const std::string& name, const char* filter);
|
||||
};
|
||||
|
||||
// Returns the current application's name, removing directory path if that
|
||||
|
@ -797,6 +797,11 @@ class PositiveAndNegativeUnitTestFilter {
|
||||
};
|
||||
} // namespace
|
||||
|
||||
bool UnitTestOptions::MatchesFilter(const std::string& name_str,
|
||||
const char* filter) {
|
||||
return UnitTestFilter{filter}.MatchesName(name_str);
|
||||
}
|
||||
|
||||
// Returns true if and only if the user-specified filter matches the test
|
||||
// suite name and the test name.
|
||||
bool UnitTestOptions::FilterMatchesTest(const std::string& test_suite_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user