From e1147fa96b474fed12f75cf7dd8e8bdf83b5abb5 Mon Sep 17 00:00:00 2001 From: Sergei Date: Thu, 5 Dec 2024 01:49:09 +0200 Subject: [PATCH] more coverage #sonar --- tests/test_public_tx.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_public_tx.cpp b/tests/test_public_tx.cpp index eb9aad0..b7cbed8 100644 --- a/tests/test_public_tx.cpp +++ b/tests/test_public_tx.cpp @@ -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 { @@ -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 { //