Skip to content

Commit

Permalink
_get_type_id unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimdrachov committed Dec 3, 2024
1 parent 43e758e commit 58f71c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_olg_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ TEST(TestOlgScheduler, EventLoopBasic)
EXPECT_THAT(evl.getTree()[1U], IsNull());
EXPECT_FALSE(evl.isEmpty());

// Check the type ID.
constexpr std::array<std::uint8_t, 16> expected_type_id =
{0xB6, 0x87, 0x48, 0xA6, 0x7A, 0xDB, 0x4D, 0xF1, 0xB3, 0x1D, 0xA9, 0x8D, 0x50, 0xA7, 0x82, 0x47};
const auto actual_type_id = decltype(evt_a)::_get_type_id_();
EXPECT_THAT(actual_type_id, testing::ElementsAreArray(expected_type_id));

auto evt_b = evl.repeat(100ms, // Smaller deadline goes on the left.
[&](const auto& arg) { b.emplace(arg); });
EXPECT_THAT(evl.getTree()[0U]->getDeadline().value().time_since_epoch(), 10'100ms);
Expand Down

0 comments on commit 58f71c1

Please sign in to comment.