#include "mojo/core/ipcz_driver/ring_buffer.h"
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/containers/span.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "base/ranges/algorithm.h"
#include "mojo/core/ipcz_driver/shared_buffer.h"
#include "mojo/core/ipcz_driver/shared_buffer_mapping.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo::core::ipcz_driver {
namespace {
RingBufferTest;
std::string_view AsString(base::span<const uint8_t> bytes) { … }
base::span<const uint8_t> AsBytes(std::string_view s) { … }
class TestRingBuffer { … };
TEST_F(RingBufferTest, EmptyReads) { … }
TEST_F(RingBufferTest, FullWrites) { … }
TEST_F(RingBufferTest, DirectReader) { … }
TEST_F(RingBufferTest, DirectWriter) { … }
TEST_F(RingBufferTest, BasicWrite) { … }
TEST_F(RingBufferTest, BasicRead) { … }
TEST_F(RingBufferTest, ExtendDataRange) { … }
TEST_F(RingBufferTest, BoundaryChecks) { … }
TEST_F(RingBufferTest, Serialization) { … }
}
}