| 70 | */ |
| 71 | |
| 72 | bool testTryPopWhenEmpty(const QueueWrapper& queueWrapper) |
| 73 | { |
| 74 | // queue is empty, so tryPop(T&) should fail immediately |
| 75 | OperationCountingType::resetCounters(); |
| 76 | waitForNextTick(); |
| 77 | const auto start = TickClock::now(); |
| 78 | uint8_t priority {}; |
| 79 | OperationCountingType testValue {}; // 1 construction |
| 80 | const auto ret = queueWrapper.tryPop(priority, testValue); |
| 81 | return ret == EAGAIN && TickClock::now() == start && queueWrapper.checkCounters(1, 0, 0, 0, 0, 0, 0) == true; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * \brief Tests QueueWrapper::tryPop() when queue is not empty - it must succeed immediately |
no test coverage detected