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

Function TEST_F

eval/public/structs/cel_proto_wrap_util_test.cc:158–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156};
157
158TEST_F(CelProtoWrapperTest, TestType) {
159 Duration msg_duration;
160 msg_duration.set_seconds(2);
161 msg_duration.set_nanos(3);
162
163 CelValue value_duration2 =
164 UnwrapMessageToValue(&msg_duration, &ProtobufValueFactoryImpl, arena());
165 EXPECT_THAT(value_duration2.type(), Eq(CelValue::Type::kDuration));
166
167 Timestamp msg_timestamp;
168 msg_timestamp.set_seconds(2);
169 msg_timestamp.set_nanos(3);
170
171 CelValue value_timestamp2 =
172 UnwrapMessageToValue(&msg_timestamp, &ProtobufValueFactoryImpl, arena());
173 EXPECT_THAT(value_timestamp2.type(), Eq(CelValue::Type::kTimestamp));
174}
175
176// This test verifies CelValue support of Duration type.
177TEST_F(CelProtoWrapperTest, TestDuration) {

Callers

nothing calls this directly

Calls 15

UnwrapMessageToValueFunction · 0.85
EncodeDurationFunction · 0.85
EqualsProtoFunction · 0.85
EncodeTimeFunction · 0.85
CreateContainerBackedMapFunction · 0.85
typeMethod · 0.80
DurationOrDieMethod · 0.80
TimestampOrDieMethod · 0.80
MapOrDieMethod · 0.80
BoolOrDieMethod · 0.80
DoubleOrDieMethod · 0.80
StringOrDieMethod · 0.80

Tested by

no test coverage detected