6 #include <gtest/gtest.h> 8 #include "../clock.hpp" 12 TEST(OutgoingTransferRegistry, Basic)
20 static const int NUM_KEYS = 5;
21 const OutgoingTransferRegistryKey keys[NUM_KEYS] =
60 ASSERT_TRUE(otr.
exists(keys[1].getDataTypeID(), keys[1].getTransferType()));
61 ASSERT_TRUE(otr.
exists(keys[0].getDataTypeID(), keys[0].getTransferType()));
62 ASSERT_TRUE(otr.
exists(keys[3].getDataTypeID(), keys[3].getTransferType()));
63 ASSERT_TRUE(otr.
exists(keys[2].getDataTypeID(), keys[2].getTransferType()));
65 ASSERT_FALSE(otr.
exists(keys[1].getDataTypeID(), keys[2].getTransferType()));
66 ASSERT_FALSE(otr.
exists(keys[0].getDataTypeID(), keys[1].getTransferType()));
67 ASSERT_FALSE(otr.
exists(keys[4].getDataTypeID(), keys[4].getTransferType()));
bool exists(DataTypeID dtid, TransferType tt) const
void cleanup(MonotonicTime ts)
uavcan::MonotonicTime tsMono(uint64_t usec)
TransferID * accessOrCreate(const OutgoingTransferRegistryKey &key, MonotonicTime new_deadline)
TEST(OutgoingTransferRegistry, Basic)