Refactor "implicit presence map behaviour" tests into its own file.

Also, change the proto used in no_field_presence_map_test into its own proto.
This should result in cleaner more isolated tests.

No other changes (other than autoformatter removing unused definitions).

PiperOrigin-RevId: 676927081
pull/18456/head
Tony Liao 5 months ago committed by Copybara-Service
parent 3bc5991d11
commit ecae71a49a
  1. 14
      src/google/protobuf/BUILD.bazel
  2. 1067
      src/google/protobuf/no_field_presence_map_test.cc
  3. 971
      src/google/protobuf/no_field_presence_test.cc
  4. 10
      src/google/protobuf/unittest_no_field_presence.proto

@ -1782,6 +1782,20 @@ cc_test(
":protobuf",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings:cord",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "no_field_presence_map_test",
srcs = ["no_field_presence_map_test.cc"],
deps = [
":cc_test_protos",
":protobuf",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@com_google_absl//absl/strings:string_view",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -100,11 +100,13 @@ message TestAllTypes {
string oneof_string = 113;
NestedEnum oneof_enum = 114;
}
}
map<int32, bytes> map_int32_bytes = 200;
map<int32, ForeignEnum> map_int32_foreign_enum = 201;
map<int32, ForeignMessage> map_int32_foreign_message = 202;
map<int32, ExplicitForeignMessage> map_int32_explicit_foreign_message = 203;
message TestAllMapTypes {
map<int32, bytes> map_int32_bytes = 1;
map<int32, ForeignEnum> map_int32_foreign_enum = 2;
map<int32, ForeignMessage> map_int32_foreign_message = 3;
map<int32, ExplicitForeignMessage> map_int32_explicit_foreign_message = 4;
}
message TestProto2Required {

Loading…
Cancel
Save