aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/annotation_test_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/annotation_test_util.h')
-rw-r--r--src/google/protobuf/compiler/annotation_test_util.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/google/protobuf/compiler/annotation_test_util.h b/src/google/protobuf/compiler/annotation_test_util.h
index 34c3f6a9..fbd3dec5 100644
--- a/src/google/protobuf/compiler/annotation_test_util.h
+++ b/src/google/protobuf/compiler/annotation_test_util.h
@@ -49,15 +49,15 @@ namespace annotation_test_util {
// file_content = content of Foo.java
// file_info = parsed content of Foo.java.pb.meta
struct ExpectedOutput {
- string file_path;
- string file_content;
+ std::string file_path;
+ std::string file_content;
GeneratedCodeInfo file_info;
- explicit ExpectedOutput(const string& file_path) : file_path(file_path) {}
+ explicit ExpectedOutput(const std::string& file_path) : file_path(file_path) {}
};
// Creates a file with name `filename` and content `data` in temp test
// directory.
-void AddFile(const string& filename, const string& data);
+void AddFile(const std::string& filename, const std::string& data);
// Runs proto compiler. Captures proto file structrue in FileDescriptorProto.
// Files will be generated in TestTempDir() folder. Callers of this
@@ -70,17 +70,17 @@ void AddFile(const string& filename, const string& data);
// annotation_unittest.cc for an example of how to initialize it.
// file: output parameter, will be set to the descriptor of the proto file
// specified in filename.
-bool RunProtoCompiler(const string& filename,
- const string& plugin_specific_args,
+bool RunProtoCompiler(const std::string& filename,
+ const std::string& plugin_specific_args,
CommandLineInterface* cli, FileDescriptorProto* file);
-bool DecodeMetadata(const string& path, GeneratedCodeInfo* info);
+bool DecodeMetadata(const std::string& path, GeneratedCodeInfo* info);
// Finds all of the Annotations for a given source file and path.
// See Location.path in http://google3/net/proto2/proto/descriptor.proto for
// explanation of what path vector is.
void FindAnnotationsOnPath(
- const GeneratedCodeInfo& info, const string& source_file,
+ const GeneratedCodeInfo& info, const std::string& source_file,
const std::vector<int>& path,
std::vector<const GeneratedCodeInfo::Annotation*>* annotations);
@@ -90,21 +90,21 @@ void FindAnnotationsOnPath(
// http://google3/net/proto2/proto/descriptor.proto for explanation of what path
// vector is.
const GeneratedCodeInfo::Annotation* FindAnnotationOnPath(
- const GeneratedCodeInfo& info, const string& source_file,
+ const GeneratedCodeInfo& info, const std::string& source_file,
const std::vector<int>& path);
// Returns true if at least one of the provided annotations covers a given
// substring in file_content.
bool AtLeastOneAnnotationMatchesSubstring(
- const string& file_content,
+ const std::string& file_content,
const std::vector<const GeneratedCodeInfo::Annotation*>& annotations,
- const string& expected_text);
+ const std::string& expected_text);
// Returns true if the provided annotation covers a given substring in
// file_content.
-bool AnnotationMatchesSubstring(const string& file_content,
+bool AnnotationMatchesSubstring(const std::string& file_content,
const GeneratedCodeInfo::Annotation* annotation,
- const string& expected_text);
+ const std::string& expected_text);
} // namespace annotation_test_util
} // namespace compiler