From df4fdc5cfd2888d51a03ca45ab75a9a305ef065a Mon Sep 17 00:00:00 2001 From: "Manikandan K. S." Date: Sat, 4 Jul 2026 22:50:12 +0530 Subject: [PATCH] fix: add C-style wide string overload to IsEmpty matcher --- googlemock/include/gmock/gmock-more-matchers.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index 39aad4c1a..b64e832f7 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -79,6 +79,12 @@ class [[nodiscard]] IsEmptyMatcher { return MatchAndExplain(std::string(s), listener); } + // Matches C-style wide strings. + bool MatchAndExplain(const wchar_t* s, + MatchResultListener* listener) const { + return MatchAndExplain(std::wstring(s), listener); + } + // Describes what this matcher matches. void DescribeTo(std::ostream* os) const { *os << "is empty"; }