#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/aligned_memory.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/client/fenced_allocator.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;
InvokeWithoutArgs;
_;
class BaseFencedAllocatorTest : public testing::Test { … };
const unsigned int BaseFencedAllocatorTest::kBufferSize;
class FencedAllocatorTest : public BaseFencedAllocatorTest { … };
TEST_F(FencedAllocatorTest, TestBasic) { … }
TEST_F(FencedAllocatorTest, TestAllocZero) { … }
TEST_F(FencedAllocatorTest, TestOutOfMemory) { … }
TEST_F(FencedAllocatorTest, TestFreePendingToken) { … }
TEST_F(FencedAllocatorTest, FreeUnused) { … }
TEST_F(FencedAllocatorTest, TestGetLargestFreeSize) { … }
TEST_F(FencedAllocatorTest, TestGetLargestFreeOrPendingSize) { … }
class FencedAllocatorWrapperTest : public BaseFencedAllocatorTest { … };
TEST_F(FencedAllocatorWrapperTest, TestBasic) { … }
TEST_F(FencedAllocatorWrapperTest, TestAllocZero) { … }
TEST_F(FencedAllocatorWrapperTest, TestAlignment) { … }
TEST_F(FencedAllocatorWrapperTest, TestOutOfMemory) { … }
TEST_F(FencedAllocatorWrapperTest, TestFreePendingToken) { … }
}