| Input does not exceed capacity(1) push max, pop max. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input does not exceed capacity(3) push max, pop max. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input does not exceed capacity(5) push 2, pop 1. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input does not exceed capacity(10) push 2, pop 1. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input exceeds capacity(1) push max+1, pop max. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input exceeds capacity(3) push max+1, pop max. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input exceeds capacity(5) push 2, pop 1. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input exceeds capacity(10) push 2, pop 1. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| empty() returns true when buffer(3 elements) is empty. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| empty() returns true when buffer(5 elements) is empty. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| full() returns true when buffer(3 elements) is full. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| full() returns true when buffer(5 elements) is full. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| reset() clears the buffer. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Test pop(), peek(), empty(), full(), size() after CircularBuffer creation. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Test CounterType/BufferSize boarder case. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Input exceeds capacity(5) push 2, pop 1 - complex type. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| peek() return data without popping the element. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|