mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-01 18:39:03 -05:00
Added info about product, OS version, commit hash and serial number to log filename to simplify triage and quick sanity check of the logs in cases many log files have to be analyzed.
26 lines
671 B
C++
26 lines
671 B
C++
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/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);
|
|
}
|