Fixed circular buffer tests

But there is the problem with mocking Serial.print
This commit is contained in:
Sviatoslav Tsariov Yurievich 2024-05-13 13:17:23 +03:00
parent 3b5e38bf7d
commit 1805e4c7ad
2 changed files with 1 additions and 3 deletions

View File

@ -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;
} }

View File

@ -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 {