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

Function TEST_P

eval/eval/container_access_step_test.cc:159–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157};
158
159TEST_P(ContainerAccessStepUniformityTest, TestListIndexAccess) {
160 ContainerBackedListImpl cel_list({CelValue::CreateInt64(1),
161 CelValue::CreateInt64(2),
162 CelValue::CreateInt64(3)});
163
164 CelValue result = EvaluateAttribute(CelValue::CreateList(&cel_list),
165 CelValue::CreateInt64(1),
166 receiver_style(), enable_unknown());
167
168 ASSERT_TRUE(result.IsInt64());
169 ASSERT_EQ(result.Int64OrDie(), 2);
170}
171
172TEST_P(ContainerAccessStepUniformityTest, TestListIndexAccessOutOfBounds) {
173 ContainerBackedListImpl cel_list({CelValue::CreateInt64(1),

Callers

nothing calls this directly

Calls 11

IsCelStringFunction · 0.85
IsInt64Method · 0.80
Int64OrDieMethod · 0.80
StringOrDieMethod · 0.80
ErrorOrDieMethod · 0.80
CreateListFunction · 0.50
CreateMapFunction · 0.50
IsErrorMethod · 0.45
IsStringMethod · 0.45
valueMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected