From baf182e006bcb82ef5e0b407e350a1d4c444b76a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 21 Apr 2023 08:42:11 -0700 Subject: [PATCH] Use the empty method to check for emptiness PiperOrigin-RevId: 526046714 Change-Id: I6ad0deff2a7f6dfef75a643c95ad914c83b9ba38 --- googlemock/test/gmock_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/test/gmock_test.cc b/googlemock/test/gmock_test.cc index 8f1bd5d0..8cfff306 100644 --- a/googlemock/test/gmock_test.cc +++ b/googlemock/test/gmock_test.cc @@ -174,6 +174,6 @@ TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) { // Makes sure Google Mock flags can be accessed in code. TEST(FlagTest, IsAccessibleInCode) { bool dummy = - GMOCK_FLAG_GET(catch_leaked_mocks) && GMOCK_FLAG_GET(verbose) == ""; + GMOCK_FLAG_GET(catch_leaked_mocks) && GMOCK_FLAG_GET(verbose).empty(); (void)dummy; // Avoids the "unused local variable" warning. }