| 134 | }; |
| 135 | |
| 136 | TEST_F(CelProtoWrapperTest, TestType) { |
| 137 | Duration msg_duration; |
| 138 | msg_duration.set_seconds(2); |
| 139 | msg_duration.set_nanos(3); |
| 140 | CelValue value_duration1 = CelProtoWrapper::CreateDuration(&msg_duration); |
| 141 | EXPECT_THAT(value_duration1.type(), Eq(CelValue::Type::kDuration)); |
| 142 | |
| 143 | CelValue value_duration2 = |
| 144 | CelProtoWrapper::CreateMessage(&msg_duration, arena()); |
| 145 | EXPECT_THAT(value_duration2.type(), Eq(CelValue::Type::kDuration)); |
| 146 | |
| 147 | Timestamp msg_timestamp; |
| 148 | msg_timestamp.set_seconds(2); |
| 149 | msg_timestamp.set_nanos(3); |
| 150 | CelValue value_timestamp1 = CelProtoWrapper::CreateTimestamp(&msg_timestamp); |
| 151 | EXPECT_THAT(value_timestamp1.type(), Eq(CelValue::Type::kTimestamp)); |
| 152 | |
| 153 | CelValue value_timestamp2 = |
| 154 | CelProtoWrapper::CreateMessage(&msg_timestamp, arena()); |
| 155 | EXPECT_THAT(value_timestamp2.type(), Eq(CelValue::Type::kTimestamp)); |
| 156 | } |
| 157 | |
| 158 | // This test verifies CelValue support of Duration type. |
| 159 | TEST_F(CelProtoWrapperTest, TestDuration) { |
nothing calls this directly
no test coverage detected