#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/client/ring_buffer.h"
#include <stdint.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
#include "gpu/command_buffer/service/command_buffer_direct.h"
#include "gpu/command_buffer/service/mocks.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
Return;
Mock;
Truly;
Sequence;
DoAll;
Invoke;
_;
class BaseRingBufferTest : public testing::Test { … };
const unsigned int BaseRingBufferTest::kBaseOffset;
const unsigned int BaseRingBufferTest::kBufferSize;
class RingBufferTest : public BaseRingBufferTest { … };
TEST_F(RingBufferTest, TestBasic) { … }
TEST_F(RingBufferTest, TestCanAllocGetLargestFreeOrPendingSize) { … }
TEST_F(RingBufferTest, TestFreePendingToken) { … }
TEST_F(RingBufferTest, TestGetLargestFreeSizeNoWaiting) { … }
TEST_F(RingBufferTest, TestFreeBug) { … }
TEST_F(RingBufferTest, DiscardTest) { … }
TEST_F(RingBufferTest, DiscardFrontTest) { … }
TEST_F(RingBufferTest, DiscardMiddleTest) { … }
TEST_F(RingBufferTest, DiscardEndTest) { … }
TEST_F(RingBufferTest, DiscardLoopedEndTest) { … }
TEST_F(RingBufferTest, DiscardEndWithPaddingTest) { … }
TEST_F(RingBufferTest, DiscardAllPaddingFromEndTest) { … }
TEST_F(RingBufferTest, DiscardAllPaddingFromBeginningTest) { … }
TEST_F(RingBufferTest, LargestFreeSizeNoWaiting) { … }
}