Go to the documentation of this file.
31 #ifndef GOOGLE_PROTOBUF_COMPILER_ANNOTATION_TEST_UTIL_H__
32 #define GOOGLE_PROTOBUF_COMPILER_ANNOTATION_TEST_UTIL_H__
34 #include <google/protobuf/descriptor.pb.h>
35 #include <google/protobuf/testing/googletest.h>
36 #include <gtest/gtest.h>
43 namespace annotation_test_util {
51 struct ExpectedOutput {
85 const std::vector<int>&
path,
86 std::vector<const GeneratedCodeInfo::Annotation*>* annotations);
95 const std::vector<int>&
path);
101 const std::vector<const GeneratedCodeInfo::Annotation*>& annotations,
115 #endif // GOOGLE_PROTOBUF_COMPILER_ANNOTATION_TEST_UTIL_H__
void AddFile(const std::string &filename, const std::string &data)
void FindAnnotationsOnPath(const GeneratedCodeInfo &info, const std::string &source_file, const std::vector< int > &path, std::vector< const GeneratedCodeInfo::Annotation * > *annotations)
ExpectedOutput(const std::string &file_path)
bool AtLeastOneAnnotationMatchesSubstring(const std::string &file_content, const std::vector< const GeneratedCodeInfo::Annotation * > &annotations, const std::string &expected_text)
GeneratedCodeInfo file_info
bool RunProtoCompiler(const std::string &filename, const std::string &plugin_specific_args, CommandLineInterface *cli, FileDescriptorProto *file)
const GeneratedCodeInfo::Annotation * FindAnnotationOnPath(const GeneratedCodeInfo &info, const std::string &source_file, const std::vector< int > &path)
bool DecodeMetadata(const std::string &path, GeneratedCodeInfo *info)
bool AnnotationMatchesSubstring(const std::string &file_content, const GeneratedCodeInfo::Annotation *annotation, const std::string &expected_text)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:41