| 16 | #include "acutest.h" |
| 17 | |
| 18 | void test_CircularBufferInit(void) { |
| 19 | CircularBuffer buff = CircularBuffer_New(sizeof(int), 16); |
| 20 | |
| 21 | // a new circular buffer should be empty |
| 22 | TEST_ASSERT(CircularBuffer_Empty(buff) == true); |
| 23 | |
| 24 | // item count of an empty circular buffer should be 0 |
| 25 | TEST_ASSERT(CircularBuffer_ItemCount(buff) == 0); |
| 26 | |
| 27 | // buffer should have available slots in it i.e. not full |
| 28 | TEST_ASSERT(CircularBuffer_Full(buff) == false); |
| 29 | |
| 30 | // clean up |
| 31 | CircularBuffer_Free(buff); |
| 32 | } |
| 33 | |
| 34 | void test_CircularBufferPopulation(void) { |
| 35 | int n; |
nothing calls this directly
no test coverage detected