Skip to content

Commit

Permalink
more coverage #sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Dec 4, 2024
1 parent 2d834f8 commit e1147fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_public_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,11 @@ TEST_CASE("TxPollSingleFrame")
REQUIRE(1 == ins_alloc.getNumAllocatedFragments());
REQUIRE(sizeof(CanardTxQueueItem) * 1 == ins_alloc.getTotalAllocatedAmount());

// 2. Poll; emulate media is busy @ 10s + 100us
// 2. Poll without time and handler.
//
REQUIRE(0 == que.poll(ins, 0, nullptr));

// 3. Poll; emulate media is busy @ 10s + 100us
//
std::size_t total_handler_calls = 0;
REQUIRE(0 == que.poll(ins, now + 100, [&](auto deadline_usec, auto& frame) -> std::int8_t {
Expand All @@ -990,7 +994,7 @@ TEST_CASE("TxPollSingleFrame")
REQUIRE(sizeof(CanardTxQueueItem) * 1 == ins_alloc.getTotalAllocatedAmount());
REQUIRE(0 == que.getInstance().stats.dropped_frames);

// 3. Poll; emulate media is ready @ 10s + 200us
// 4. Poll; emulate media is ready @ 10s + 200us
//
REQUIRE(1 == que.poll(ins, now + 200, [&](auto deadline_usec, auto& frame) -> std::int8_t {
//
Expand Down

0 comments on commit e1147fa

Please sign in to comment.