#include "base/memory/weak_auto_reset.h"
#include <memory>
#include "base/memory/weak_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
template <class T>
class HasWeakFactory { … };
}
TEST(WeakAutoResetTest, DefaultConstructor) { … }
TEST(WeakAutoResetTest, SingleAutoReset) { … }
TEST(WeakAutoResetTest, SingleAutoResetObjectDestroyed) { … }
TEST(WeakAutoResetTest, MultipleNested) { … }
TEST(WeakAutoResetTest, MultipleNestedObjectDestroyed) { … }
TEST(WeakAutoResetTest, MoveAssignmentTransfersOwnership) { … }
TEST(WeakAutoResetTest, MoveAssignmentResetsOldValue) { … }
TEST(WeakAutoResetTest, MoveAssignmentToSelfIsNoOp) { … }
TEST(WeakAutoResetTest, DeleteTargetObjectAfterMoveIsSafe) { … }
HasWeakFactoryPointer;
TEST(WeakAutoResetTest, TestSafelyMovesValue) { … }
TEST(WeakAutoResetTest, TestSafelyMovesValueAndThenDestroysIt) { … }
TEST(WeakAutoResetTest, TestMoveConstructorMovesOldValue) { … }
TEST(WeakAutoResetTest, TestMoveAssignmentMovesOldValue) { … }
TEST(WeakAutoResetTest, TestOldAndNewValuesAreSwapped) { … }
}