#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/webrtc_logging/common/partial_circular_buffer.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
namespace webrtc_logging {
namespace {
const uint32_t kWrapPosition = …;
const uint8_t kInputData[] = …;
const uint8_t kOutputRefDataWrap[] = …
{ … };
}
class PartialCircularBufferTest : public testing::Test { … };
TEST_F(PartialCircularBufferTest, NoWrapBeginningPartOnly) { … }
TEST_F(PartialCircularBufferTest, NoWrapBeginningAndEndParts) { … }
TEST_F(PartialCircularBufferTest, WrapOnce) { … }
TEST_F(PartialCircularBufferTest, WrapTwice) { … }
TEST_F(PartialCircularBufferTest, WrapOnceSmallerOutputBuffer) { … }
TEST_F(PartialCircularBufferTest, WrapOnceWithAppend) { … }
TEST_F(PartialCircularBufferTest, WrapTwiceWithAppend) { … }
TEST_F(PartialCircularBufferTest, WrapOnceThenOverwriteWithNoWrap) { … }
TEST_F(PartialCircularBufferTest, WrapTwiceWithSingleWrite) { … }
}