| 156 | }; |
| 157 | |
| 158 | TEST_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. |
| 177 | TEST_F(CelProtoWrapperTest, TestDuration) { |
nothing calls this directly
no test coverage detected