Helper method. Looks up in registry and tests comparison operation.
| 110 | |
| 111 | // Helper method. Looks up in registry and tests comparison operation. |
| 112 | void TestComparison(absl::string_view operation, const CelValue& ref, |
| 113 | const CelValue& other, bool result) { |
| 114 | CelValue result_value; |
| 115 | |
| 116 | ASSERT_NO_FATAL_FAILURE( |
| 117 | PerformRun(operation, {}, {ref, other}, &result_value)); |
| 118 | |
| 119 | ASSERT_EQ(result_value.IsBool(), true) |
| 120 | << absl::StrCat(CelValue::TypeName(ref.type()), " ", operation, " ", |
| 121 | CelValue::TypeName(other.type())); |
| 122 | ASSERT_EQ(result_value.BoolOrDie(), result) |
| 123 | << operation << " for " << ref.DebugString() << " with " |
| 124 | << other.DebugString(); |
| 125 | } |
| 126 | |
| 127 | // Helper method. Looks up in registry and tests for no matching equality |
| 128 | // overload. |
nothing calls this directly
no test coverage detected