#include "base/synchronization/atomic_flag.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/gtest_util.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
void ExpectSetFlagDeath(AtomicFlag* flag) { … }
void BusyWaitUntilFlagIsSet(AtomicFlag* tested_flag, bool* expected_after_flag,
AtomicFlag* done_flag) { … }
}
TEST(AtomicFlagTest, SimpleSingleThreadedTest) { … }
TEST(AtomicFlagTest, DoubleSetTest) { … }
TEST(AtomicFlagTest, ReadFromDifferentThread) { … }
TEST(AtomicFlagTest, SetOnDifferentSequenceDeathTest) { … }
}