22 #include "gtest/gtest.h" 28 class OrderedMultiQueueTest :
public ::testing::Test {
37 queue_.AddQueue(queue_key, [
this](std::unique_ptr<Data> data) {
39 EXPECT_GE(data->GetTime(),
values_.back()->GetTime());
41 values_.push_back(std::move(data));
46 std::unique_ptr<Data> MakeImu(
const int ordinal) {
50 Eigen::Vector3d::Zero()});
53 std::vector<std::unique_ptr<Data>>
values_;
57 TEST_F(OrderedMultiQueueTest, Ordering) {
76 for (
size_t i = 0; i <
values_.size() - 1; ++i) {
81 TEST_F(OrderedMultiQueueTest, MarkQueueAsFinished) {
93 for (
size_t i = 0; i <
values_.size(); ++i) {
98 TEST_F(OrderedMultiQueueTest, CommonStartTimePerTrajectory) {
common::Time GetTime(const T &t)
Time FromUniversal(const int64 ticks)
int64 ToUniversal(const Time time)
std::vector< std::unique_ptr< Data > > values_
std::unique_ptr< Dispatchable< DataType > > MakeDispatchable(const std::string &sensor_id, const DataType &data)