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

Function TEST

eval/public/activation_bind_helper_test.cc:19–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using testutil::EqualsProto;
18
19TEST(ActivationBindHelperTest, TestSingleBoolBind) {
20 TestMessage message;
21 message.set_bool_value(true);
22
23 google::protobuf::Arena arena;
24
25 Activation activation;
26
27 ASSERT_OK(BindProtoToActivation(&message, &arena, &activation));
28
29 auto result = activation.FindValue("bool_value", &arena);
30
31 ASSERT_TRUE(result.has_value());
32
33 CelValue value = result.value();
34
35 ASSERT_TRUE(value.IsBool());
36 EXPECT_EQ(value.BoolOrDie(), true);
37}
38
39TEST(ActivationBindHelperTest, TestSingleInt32Bind) {
40 TestMessage message;

Callers

nothing calls this directly

Calls 13

EqualsProtoFunction · 0.85
FindValueMethod · 0.80
BoolOrDieMethod · 0.80
IsInt64Method · 0.80
Int64OrDieMethod · 0.80
ListOrDieMethod · 0.80
MessageOrDieMethod · 0.80
BindProtoToActivationFunction · 0.70
has_valueMethod · 0.45
valueMethod · 0.45
IsBoolMethod · 0.45
IsListMethod · 0.45

Tested by

no test coverage detected