mirror of
https://github.com/google/googletest.git
synced 2026-03-14 20:27:44 +00:00
Improve str concatenation performance on MatchesTest
Update str concatenation, instead of use operation+ use absl::StrCat whenever available. PiperOrigin-RevId: 874649732 Change-Id: I0acd91c04a9e50fa306e7130479bc330c1a0f068
This commit is contained in:
committed by
Copybara-Service
parent
a407966592
commit
73a63ea05d
@@ -885,7 +885,11 @@ class PositiveAndNegativeUnitTestFilter {
|
||||
// and does not match the negative filter.
|
||||
bool MatchesTest(const std::string& test_suite_name,
|
||||
const std::string& test_name) const {
|
||||
#ifdef GTEST_HAS_ABSL
|
||||
return MatchesName(absl::StrCat(test_suite_name, ".", test_name));
|
||||
#else
|
||||
return MatchesName(test_suite_name + "." + test_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Returns true if and only if name matches the positive filter and does not
|
||||
|
||||
Reference in New Issue
Block a user