chromium/third_party/angle/src/common/FixedQueue_unittest.cpp

//
// Copyright 2023 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CircularBuffer_unittest:
//   Tests of the CircularBuffer class
//

#include <gtest/gtest.h>

#include "common/FixedQueue.h"

#include <chrono>
#include <thread>

namespace angle
{
// Make sure the various constructors compile and do basic checks
TEST(FixedQueue, Constructors)
{}

// Make sure the destructor destroys all elements.
TEST(FixedQueue, Destructor)
{}

// Make sure the pop destroys the element.
TEST(FixedQueue, Pop)
{}

// Test circulating behavior.
TEST(FixedQueue, WrapAround)
{}

// Test concurrent push and pop behavior.
TEST(FixedQueue, ConcurrentPushPop)
{}

// Test concurrent push and pop behavior. When queue is full, instead of wait, it will try to
// increase capacity. At dequeue thread, it will also try to shrink the queue capacity when size
// fall under half of the capacity.
TEST(FixedQueue, ConcurrentPushPopWithResize)
{}

// Test clearing the queue
TEST(FixedQueue, Clear)
{}
}  // namespace angle