MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / TEST_P

Function TEST_P

eval/public/equality_function_registrar_test.cc:206–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206TEST_P(CelValueEqualImplTypesTest, Basic) {
207 absl::optional<bool> result = CelValueEqualImpl(lhs(), rhs());
208
209 if (lhs().IsNull() || rhs().IsNull()) {
210 if (lhs().IsNull() && rhs().IsNull()) {
211 EXPECT_THAT(result, Optional(true));
212 } else {
213 EXPECT_THAT(result, Optional(false));
214 }
215 } else if (lhs().type() == rhs().type() ||
216 (IsNumeric(lhs().type()) && IsNumeric(rhs().type()))) {
217 EXPECT_THAT(result, Optional(should_be_equal()));
218 } else {
219 EXPECT_THAT(result, Optional(false));
220 }
221}
222
223INSTANTIATE_TEST_SUITE_P(EqualityBetweenTypes, CelValueEqualImplTypesTest,
224 Combine(ValuesIn(ValueExamples1()),

Callers

nothing calls this directly

Calls 8

IsCelBoolFunction · 0.85
IsCelErrorFunction · 0.85
typeMethod · 0.80
IsNumericFunction · 0.70
CelValueEqualImplClass · 0.50
IsNullMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected