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

Method TestLogicalOperation

eval/public/builtin_func_test.cc:255–266  ·  view source on GitHub ↗

Helper method to test && and || operations

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 2

BoolOrDieMethod · 0.80
IsBoolMethod · 0.45

Tested by

no test coverage detected