#include "base/at_exit.h"
#include "base/functional/bind.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
int g_test_counter_1 = …;
int g_test_counter_2 = …;
void IncrementTestCounter1(void* unused) { … }
void IncrementTestCounter2(void* unused) { … }
void ZeroTestCounters() { … }
void ExpectCounter1IsZero(void* unused) { … }
void ExpectParamIsNull(void* param) { … }
void ExpectParamIsCounter(void* param) { … }
}
class AtExitTest : public testing::Test { … };
TEST_F(AtExitTest, Basic) { … }
TEST_F(AtExitTest, LIFOOrder) { … }
TEST_F(AtExitTest, Param) { … }
TEST_F(AtExitTest, Task) { … }