MCPcopy Create free account
hub / github.com/DISTORTEC/distortos / testTryPushWhenFull

Function testTryPushWhenFull

test/Queue/QueueOperationsTestCase.cpp:111–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 */
110
111bool testTryPushWhenFull(const QueueWrapper& queueWrapper)
112{
113 // queue is full, so tryPush(..., const T&) should fail immediately
114 OperationCountingType::resetCounters();
115 waitForNextTick();
116 const auto start = TickClock::now();
117 const uint8_t priority {};
118 const OperationCountingType testValue {}; // 1 construction
119 const auto ret = queueWrapper.tryPush(priority, testValue);
120 return ret == EAGAIN && TickClock::now() == start && queueWrapper.checkCounters(1, 0, 0, 0, 0, 0, 0) == true;
121}
122
123/**
124 * \brief Phase 1 of test case.

Callers 2

phase1Function · 0.85
phase2Function · 0.85

Calls 3

waitForNextTickFunction · 0.85
tryPushMethod · 0.45
checkCountersMethod · 0.45

Tested by

no test coverage detected