Small tweaks to C# unit tests (#9271)

This change includes just a couple small tweaks:
- Keep line lengths under 80 characters
- Fully qualify google::protobuf::Any so that the code still compiles
  internally where we use a different namespace.
pull/7123/head^2
Adam Cozzette 3 years ago committed by GitHub
parent b79ac0e6e2
commit 9a1d5dfa4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc
  2. 4
      src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc

@ -110,7 +110,8 @@ class MockGeneratorContext : public GeneratorContext {
class GenerateAndTest {
public:
GenerateAndTest() {}
void Run(const FileDescriptor* proto_file, std::string file1, std::string file2) {
void Run(const FileDescriptor* proto_file, std::string file1,
std::string file2) {
ASSERT_TRUE(proto_file != NULL) << TestSourceDir();
ASSERT_TRUE(generator_.Generate(proto_file, parameter_,
&context_, &error_));

@ -65,12 +65,12 @@ TEST(CSharpEnumValue, PascalCasedPrefixStripping) {
TEST(DescriptorProtoHelpers, IsDescriptorProto) {
EXPECT_TRUE(IsDescriptorProto(DescriptorProto::descriptor()->file()));
EXPECT_FALSE(IsDescriptorProto(Any::descriptor()->file()));
EXPECT_FALSE(IsDescriptorProto(google::protobuf::Any::descriptor()->file()));
}
TEST(DescriptorProtoHelpers, IsDescriptorOptionMessage) {
EXPECT_TRUE(IsDescriptorOptionMessage(FileOptions::descriptor()));
EXPECT_FALSE(IsDescriptorOptionMessage(Any::descriptor()));
EXPECT_FALSE(IsDescriptorOptionMessage(google::protobuf::Any::descriptor()));
EXPECT_FALSE(IsDescriptorOptionMessage(DescriptorProto::descriptor()));
}

Loading…
Cancel
Save