Helper method to test && and || operations
| 253 | |
| 254 | // Helper method to test && and || operations |
| 255 | void TestLogicalOperation(absl::string_view operation, bool v1, bool v2, |
| 256 | bool result) { |
| 257 | CelValue result_value; |
| 258 | |
| 259 | ASSERT_NO_FATAL_FAILURE(PerformRun( |
| 260 | operation, {}, {CelValue::CreateBool(v1), CelValue::CreateBool(v2)}, |
| 261 | &result_value)); |
| 262 | |
| 263 | ASSERT_EQ(result_value.IsBool(), true); |
| 264 | |
| 265 | ASSERT_EQ(result_value.BoolOrDie(), result) << operation; |
| 266 | } |
| 267 | |
| 268 | void TestComparisonsForType(CelValue::Type kind, const CelValue& ref, |
| 269 | const CelValue& lesser) { |