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

Function TEST

eval/eval/shadowable_value_step_test.cc:50–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50TEST(ShadowableValueStepTest, TestEvaluateNoShadowing) {
51 absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv();
52 std::string type_name = "google.api.expr.runtime.TestMessage";
53
54 Activation activation;
55 Arena arena;
56
57 auto type_value = CreateTypeValueFromView(&arena, type_name);
58 auto status =
59 RunShadowableExpression(env, type_name, type_value, activation, &arena);
60 ASSERT_OK(status);
61
62 auto value = status.value();
63 ASSERT_TRUE(value.IsCelType());
64 EXPECT_THAT(value.CelTypeOrDie().value(), Eq(type_name));
65}
66
67TEST(ShadowableValueStepTest, TestEvaluateShadowedIdentifier) {
68 absl_nonnull std::shared_ptr<const RuntimeEnv> env = NewTestingRuntimeEnv();

Callers

nothing calls this directly

Calls 8

CreateTypeValueFromViewFunction · 0.85
RunShadowableExpressionFunction · 0.85
IsCelTypeMethod · 0.80
CelTypeOrDieMethod · 0.80
InsertValueMethod · 0.80
IsInt64Method · 0.80
Int64OrDieMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected