Helper method. Looks up in registry and tests for no matching equality overload.
| 127 | // Helper method. Looks up in registry and tests for no matching equality |
| 128 | // overload. |
| 129 | void TestNoMatchingEqualOverload(const CelValue& ref, const CelValue& other) { |
| 130 | options_.enable_heterogeneous_equality = false; |
| 131 | CelValue eq_value; |
| 132 | ASSERT_NO_FATAL_FAILURE( |
| 133 | PerformRun(builtin::kEqual, {}, {ref, other}, &eq_value, options_)); |
| 134 | ASSERT_TRUE(eq_value.IsError()) |
| 135 | << " for " << CelValue::TypeName(ref.type()) << " and " |
| 136 | << CelValue::TypeName(other.type()); |
| 137 | EXPECT_TRUE(CheckNoMatchingOverloadError(eq_value)); |
| 138 | |
| 139 | CelValue ineq_value; |
| 140 | ASSERT_NO_FATAL_FAILURE( |
| 141 | PerformRun(builtin::kInequal, {}, {ref, other}, &ineq_value, options_)); |
| 142 | ASSERT_TRUE(ineq_value.IsError()) |
| 143 | << " for " << CelValue::TypeName(ref.type()) << " and " |
| 144 | << CelValue::TypeName(other.type()); |
| 145 | EXPECT_TRUE(CheckNoMatchingOverloadError(ineq_value)); |
| 146 | } |
| 147 | |
| 148 | // Helper method. Looks up in registry and tests Type conversions. |
| 149 | void TestTypeConverts(absl::string_view operation, const CelValue& ref, |
nothing calls this directly
no test coverage detected