| 143 | } |
| 144 | |
| 145 | bool MessageEqual(const CelValue::MessageWrapper& m1, |
| 146 | const CelValue::MessageWrapper& m2) { |
| 147 | const LegacyTypeInfoApis* lhs_type_info = m1.legacy_type_info(); |
| 148 | const LegacyTypeInfoApis* rhs_type_info = m2.legacy_type_info(); |
| 149 | |
| 150 | if (lhs_type_info->GetTypename(m1) != rhs_type_info->GetTypename(m2)) { |
| 151 | return false; |
| 152 | } |
| 153 | |
| 154 | const LegacyTypeAccessApis* accessor = lhs_type_info->GetAccessApis(m1); |
| 155 | |
| 156 | if (accessor == nullptr) { |
| 157 | return false; |
| 158 | } |
| 159 | |
| 160 | return accessor->IsEqualTo(m1, m2); |
| 161 | } |
| 162 | |
| 163 | // Generic equality for CEL values of the same type. |
| 164 | // EqualityProvider is used for equality among members of container types. |
no test coverage detected