From af4c3cfcb37b754bc4ff6ad79540b9a0b37593ea Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 27 Jul 2026 21:56:57 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 955017590 Change-Id: I5125f56376603462fb63796fec1fbc50fd4d935f --- googletest/samples/sample2_unittest.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/googletest/samples/sample2_unittest.cc b/googletest/samples/sample2_unittest.cc index cd734f943..b959a24d9 100644 --- a/googletest/samples/sample2_unittest.cc +++ b/googletest/samples/sample2_unittest.cc @@ -39,6 +39,8 @@ #include "sample2.h" +#include + #include "gtest/gtest.h" namespace { // In this example, we test the MyString class (a simple string). @@ -78,7 +80,7 @@ const char kHelloString[] = "Hello, world!"; TEST(MyString, ConstructorFromCString) { const MyString s(kHelloString); EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); - EXPECT_EQ(sizeof(kHelloString) / sizeof(kHelloString[0]) - 1, s.Length()); + EXPECT_EQ(std::size(kHelloString) - 1, s.Length()); } // Tests the copy c'tor.