| 83 | using UnaryMessageEqualsTest = TestWithParam<UnaryMessageEqualsTestParam>; |
| 84 | |
| 85 | google::protobuf::Message* PackMessage(const google::protobuf::Message& message) { |
| 86 | const auto* descriptor = |
| 87 | ABSL_DIE_IF_NULL(GetTestingDescriptorPool()->FindMessageTypeByName( |
| 88 | MessageTypeNameFor<google::protobuf::Any>())); |
| 89 | const auto* prototype = |
| 90 | ABSL_DIE_IF_NULL(GetTestingMessageFactory()->GetPrototype(descriptor)); |
| 91 | auto instance = prototype->New(GetTestArena()); |
| 92 | auto reflection = well_known_types::GetAnyReflectionOrDie(descriptor); |
| 93 | reflection.SetTypeUrl( |
| 94 | cel::to_address(instance), |
| 95 | absl::StrCat("type.googleapis.com/", message.GetTypeName())); |
| 96 | absl::Cord value; |
| 97 | ABSL_CHECK(message.SerializeToString(&value)); |
| 98 | reflection.SetValue(cel::to_address(instance), value); |
| 99 | return instance; |
| 100 | } |
| 101 | |
| 102 | TEST_P(UnaryMessageEqualsTest, Equals) { |
| 103 | const auto* pool = GetTestingDescriptorPool(); |
no test coverage detected