Handle un-handled cases of TestOneof2 in unittest

Change-Id: I8f082ee3117ed873ab472a539867ff7cae58e8fd
changes/64/231564/1
Bo Yang 10 years ago
parent d6c9f644ac
commit 9a12185323
  1. 9
      src/google/protobuf/compiler/cpp/cpp_unittest.cc

@ -1392,6 +1392,12 @@ class OneofTest : public testing::Test {
case unittest::TestOneof2::kFooString: case unittest::TestOneof2::kFooString:
EXPECT_TRUE(message.has_foo_string()); EXPECT_TRUE(message.has_foo_string());
break; break;
case unittest::TestOneof2::kFooCord:
EXPECT_TRUE(message.has_foo_cord());
break;
case unittest::TestOneof2::kFooStringPiece:
EXPECT_TRUE(message.has_foo_string_piece());
break;
case unittest::TestOneof2::kFooBytes: case unittest::TestOneof2::kFooBytes:
EXPECT_TRUE(message.has_foo_bytes()); EXPECT_TRUE(message.has_foo_bytes());
break; break;
@ -1404,6 +1410,9 @@ class OneofTest : public testing::Test {
case unittest::TestOneof2::kFoogroup: case unittest::TestOneof2::kFoogroup:
EXPECT_TRUE(message.has_foogroup()); EXPECT_TRUE(message.has_foogroup());
break; break;
case unittest::TestOneof2::kFooLazyMessage:
EXPECT_TRUE(message.has_foo_lazy_message());
break;
case unittest::TestOneof2::FOO_NOT_SET: case unittest::TestOneof2::FOO_NOT_SET:
break; break;
} }

Loading…
Cancel
Save