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

Function TEST

eval/eval/create_struct_step_test.cc:245–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245TEST(CreateCreateStructStepTest, TestMessageCreateError) {
246 absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv();
247 Arena arena;
248 TestMessage test_msg;
249 absl::Status error = absl::CancelledError();
250
251 auto eval_status =
252 RunExpression(env, "bool_value", CelValue::CreateError(&error), &arena,
253 true, /*enable_recursive_planning=*/false);
254 ASSERT_THAT(eval_status, IsOk());
255 EXPECT_THAT(*eval_status->ErrorOrDie(),
256 StatusIs(absl::StatusCode::kCancelled));
257}
258
259TEST(CreateCreateStructStepTest, TestMessageCreateErrorRecursive) {
260 absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv();

Callers

nothing calls this directly

Calls 5

RunExpressionFunction · 0.85
ErrorOrDieMethod · 0.80
IsUnknownSetMethod · 0.80
CreateErrorFunction · 0.50
DebugStringMethod · 0.45

Tested by

no test coverage detected