|
|
|
@ -216,6 +216,15 @@ TEST_F(ParserTest, StopAfterSyntaxIdentifierWithErrors) { |
|
|
|
|
EXPECT_EQ("1:9: Expected syntax identifier.\n", error_collector_.text_); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_F(ParserTest, WarnIfSyntaxIdentifierOmmitted) { |
|
|
|
|
SetupParser("message A {}"); |
|
|
|
|
FileDescriptorProto file; |
|
|
|
|
CaptureTestStderr(); |
|
|
|
|
EXPECT_TRUE(parser_->Parse(input_.get(), &file)); |
|
|
|
|
EXPECT_TRUE( |
|
|
|
|
GetCapturedTestStderr().find("No syntax specified") != string::npos); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ===================================================================
|
|
|
|
|
|
|
|
|
|
typedef ParserTest ParseMessageTest; |
|
|
|
|