chromium/base/memory/weak_auto_reset_unittest.cc

// Copyright 2022 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/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 {};

}  // namespace

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) {}

}  // namespace base