#include "base/threading/thread_collision_warner.h"
#include <memory>
#include "base/compiler_specific.h"
#include "base/dcheck_is_on.h"
#include "base/memory/raw_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
#include "base/threading/simple_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#if !DCHECK_IS_ON()
#undef DFAKE_MUTEX
#define DFAKE_MUTEX …
#define EXPECT_NDCHECK_FALSE_DCHECK_TRUE …
#else
#define EXPECT_NDCHECK_FALSE_DCHECK_TRUE …
#endif
namespace {
class AssertReporter : public base::AsserterBase { … };
}
TEST(ThreadCollisionTest, BookCriticalSection) { … }
TEST(ThreadCollisionTest, ScopedRecursiveBookCriticalSection) { … }
TEST(ThreadCollisionTest, ScopedBookCriticalSection) { … }
TEST(ThreadCollisionTest, MTBookCriticalSectionTest) { … }
#ifndef THREAD_SANITIZER
TEST(ThreadCollisionTest, MTScopedBookCriticalSectionTest) { … }
#endif
TEST(ThreadCollisionTest, MTSynchedScopedBookCriticalSectionTest) { … }
TEST(ThreadCollisionTest, MTSynchedScopedRecursiveBookCriticalSectionTest) { … }