aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/mock_code_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/mock_code_generator.cc')
-rw-r--r--src/google/protobuf/compiler/mock_code_generator.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc
index cd951ad5..83d5a4e4 100644
--- a/src/google/protobuf/compiler/mock_code_generator.cc
+++ b/src/google/protobuf/compiler/mock_code_generator.cc
@@ -50,7 +50,7 @@ static const char* kSecondInsertionPointName = "second_mock_insertion_point";
static const char* kFirstInsertionPoint =
"# @@protoc_insertion_point(first_mock_insertion_point) is here\n";
static const char* kSecondInsertionPoint =
- "# @@protoc_insertion_point(second_mock_insertion_point) is here\n";
+ " # @@protoc_insertion_point(second_mock_insertion_point) is here\n";
MockCodeGenerator::MockCodeGenerator(const string& name)
: name_(name) {}
@@ -94,8 +94,10 @@ void MockCodeGenerator::ExpectGenerated(
EXPECT_EQ(GetOutputFileContent(insertion_list[i], "first_insert",
file, first_message_name),
lines[1 + i]);
- EXPECT_EQ(GetOutputFileContent(insertion_list[i], "second_insert",
- file, first_message_name),
+ // Second insertion point is indented, so the inserted text should
+ // automatically be indented too.
+ EXPECT_EQ(" " + GetOutputFileContent(insertion_list[i], "second_insert",
+ file, first_message_name),
lines[2 + insertion_list.size() + i]);
}
}