mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-20 11:59:12 -05:00
26 lines
683 B
C++
26 lines
683 B
C++
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/blob/master/LICENSE.md
|
|
|
|
#include <catch2/catch.hpp>
|
|
#include <LoggerBufferContainer.hpp>
|
|
|
|
TEST_CASE("Test if proper buffer is chosen")
|
|
{
|
|
LoggerBufferContainer buffer;
|
|
|
|
size_t bufferIndex = buffer.getCurrentIndex();
|
|
REQUIRE(bufferIndex == 0);
|
|
|
|
buffer.nextBuffer();
|
|
bufferIndex = buffer.getCurrentIndex();
|
|
REQUIRE(bufferIndex == 1);
|
|
|
|
buffer.nextBuffer();
|
|
bufferIndex = buffer.getCurrentIndex();
|
|
REQUIRE(bufferIndex == 0);
|
|
|
|
buffer.nextBuffer();
|
|
bufferIndex = buffer.getCurrentIndex();
|
|
REQUIRE(bufferIndex == 1);
|
|
}
|