chromium/base/task/common/operations_controller_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/task/common/operations_controller.h"

#include <atomic>
#include <cstdint>
#include <utility>

#include "base/memory/raw_ref.h"
#include "base/ranges/algorithm.h"
#include "base/threading/platform_thread.h"
#include "base/threading/simple_thread.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace internal {
namespace {

class ScopedShutdown {};

TEST(OperationsControllerTest, CanBeDestroyedWithoutWaiting) {}

TEST(OperationsControllerTest, CanShutdownIfNotStarted) {}

TEST(OperationsControllerTest, FailsToBeginWhenNotStarted) {}

TEST(OperationsControllerTest, CanShutdownAfterTryCallsIfNotStarted) {}

TEST(OperationsControllerTest,
     StartAcceptingOperationsReturnsFalseIfNoRejectedBeginAttempts) {}

TEST(OperationsControllerTest,
     StartAcceptingOperationsReturnsTrueIfFailedBeginAttempts) {}

TEST(OperationsControllerTest, SuccesfulBeginReturnsValidScopedObject) {}

TEST(OperationsControllerTest, BeginFailsAfterShutdown) {}

TEST(OperationsControllerTest, ScopedOperationsControllerIsMoveConstructible) {}

// Dummy SimpleThread implementation that periodically begins and ends
// operations until one of them fails.
class TestThread : public SimpleThread {};

TEST(OperationsControllerTest, BeginsFromMultipleThreads) {}

}  // namespace
}  // namespace internal
}  // namespace base