Internal Code Change

PiperOrigin-RevId: 577274352
pull/14535/head
Chris Kennelly 1 year ago committed by Copybara-Service
parent 37cae2d2e1
commit b2efcdc1c5
  1. 1
      src/google/protobuf/arenaz_sampler_test.cc
  2. 1
      src/google/protobuf/compiler/cpp/unittest.inc
  3. 6
      src/google/protobuf/repeated_field_unittest.cc

@ -401,6 +401,7 @@ TEST(ThreadSafeArenazSamplerTest, InitialBlockReportsZeroUsedAndWasted) {
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
char block[kSize]; char block[kSize];
google::protobuf::Arena arena(/*initial_block=*/block, /*initial_block_size=*/kSize); google::protobuf::Arena arena(/*initial_block=*/block, /*initial_block_size=*/kSize);
benchmark::DoNotOptimize(&arena);
sampler.Iterate([&](const ThreadSafeArenaStats& h) { sampler.Iterate([&](const ThreadSafeArenaStats& h) {
const auto& histbin = const auto& histbin =
h.block_histogram[ThreadSafeArenaStats::FindBin(kSize)]; h.block_histogram[ThreadSafeArenaStats::FindBin(kSize)];

@ -926,7 +926,6 @@ TEST(GENERATED_MESSAGE_TEST_NAME, TestOneofSpaceUsed) {
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS #endif // !PROTOBUF_TEST_NO_DESCRIPTORS
TEST(GENERATED_MESSAGE_TEST_NAME, FieldConstantValues) { TEST(GENERATED_MESSAGE_TEST_NAME, FieldConstantValues) {
UNITTEST::TestRequired message;
EXPECT_EQ(UNITTEST::TestAllTypes_NestedMessage::kBbFieldNumber, 1); EXPECT_EQ(UNITTEST::TestAllTypes_NestedMessage::kBbFieldNumber, 1);
EXPECT_EQ(UNITTEST::TestAllTypes::kOptionalInt32FieldNumber, 1); EXPECT_EQ(UNITTEST::TestAllTypes::kOptionalInt32FieldNumber, 1);
EXPECT_EQ(UNITTEST::TestAllTypes::kOptionalgroupFieldNumber, 16); EXPECT_EQ(UNITTEST::TestAllTypes::kOptionalgroupFieldNumber, 16);

@ -704,9 +704,9 @@ TEST(RepeatedField, CopyConstructIntegers) {
EXPECT_EQ(2, fields1.Get(1)); EXPECT_EQ(2, fields1.Get(1));
RepeatedType fields2(token, nullptr, original); RepeatedType fields2(token, nullptr, original);
ASSERT_EQ(2, fields1.size()); ASSERT_EQ(2, fields2.size());
EXPECT_EQ(1, fields1.Get(0)); EXPECT_EQ(1, fields2.Get(0));
EXPECT_EQ(2, fields1.Get(1)); EXPECT_EQ(2, fields2.Get(1));
} }
TEST(RepeatedField, CopyConstructCords) { TEST(RepeatedField, CopyConstructCords) {

Loading…
Cancel
Save