Internal changes

PiperOrigin-RevId: 588627840
pull/14955/head
Mike Kruskal 12 months ago committed by Copybara-Service
parent acad27f027
commit 2726632054
  1. 1
      src/google/protobuf/descriptor.cc
  2. 4
      src/google/protobuf/descriptor_unittest.cc

@ -3125,6 +3125,7 @@ bool FormatLineOptions(int depth, const Message& options,
return !all_options.empty(); return !all_options.empty();
} }
class SourceLocationCommentPrinter { class SourceLocationCommentPrinter {
public: public:
template <typename DescType> template <typename DescType>

@ -14,6 +14,7 @@
#include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor.h"
#include <cstdlib> #include <cstdlib>
#include <functional>
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <string> #include <string>
@ -4018,7 +4019,7 @@ class ValidationErrorTest : public testing::Test {
} }
// Parse file_text as a FileDescriptorProto in text format and add it // Parse file_text as a FileDescriptorProto in text format and add it
// to the DescriptorPool. Expect no errors. // to the DescriptorPool. Expect no errors.
const FileDescriptor* BuildFile(const std::string& file_text) { const FileDescriptor* BuildFile(absl::string_view file_text) {
FileDescriptorProto file_proto; FileDescriptorProto file_proto;
EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto));
return ABSL_DIE_IF_NULL(pool_.BuildFile(file_proto)); return ABSL_DIE_IF_NULL(pool_.BuildFile(file_proto));
@ -10496,6 +10497,7 @@ TEST_F(DescriptorPoolFeaturesTest, OverrideDefaults) {
TEST_F(ValidationErrorTest, ExtensionDeclarationsMatchFullNameCompile) { TEST_F(ValidationErrorTest, ExtensionDeclarationsMatchFullNameCompile) {
BuildFile(R"pb( BuildFile(R"pb(
name: "foo.proto" name: "foo.proto"

Loading…
Cancel
Save