Fixed circular buffer tests
But there is the problem with mocking Serial.print
This commit is contained in:
parent
3b5e38bf7d
commit
1805e4c7ad
@ -30,8 +30,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ErrorCode pushBack(const T& item) {
|
ErrorCode pushBack(const T& item) {
|
||||||
Serial.print(_count);
|
|
||||||
Serial.print(_capacity);
|
|
||||||
if (_count == _capacity) {
|
if (_count == _capacity) {
|
||||||
return ErrorCode::BUFFER_FULL;
|
return ErrorCode::BUFFER_FULL;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ class CircularBufferTest : public ::testing::Test {
|
|||||||
protected:
|
protected:
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
// Initialization code that runs before each test
|
// Initialization code that runs before each test
|
||||||
buffer = new CircularBuffer<int>(5); // Create a circular buffer of integers with capacity 5
|
buffer = new CircularBuffer<int>(3); // Create a circular buffer of integers with capacity 5
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user