#include "base/containers/linked_list.h"
#include "base/containers/span.h"
#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
class Node : public LinkNode<Node> { … };
class MultipleInheritanceNodeBase { … };
class MultipleInheritanceNode : public MultipleInheritanceNodeBase,
public LinkNode<MultipleInheritanceNode> { … };
class MovableNode : public LinkNode<MovableNode> { … };
void ExpectListContentsForDirection(const LinkedList<Node>& list,
base::span<const int> node_ids,
bool forward) { … }
void ExpectListContents(const LinkedList<Node>& list,
base::span<const int> node_ids) { … }
TEST(LinkedList, Empty) { … }
TEST(LinkedList, Append) { … }
TEST(LinkedList, RemoveFromList) { … }
TEST(LinkedList, InsertBefore) { … }
TEST(LinkedList, InsertAfter) { … }
TEST(LinkedList, MultipleInheritanceNode) { … }
TEST(LinkedList, EmptyListIsEmpty) { … }
TEST(LinkedList, NonEmptyListIsNotEmpty) { … }
TEST(LinkedList, EmptiedListIsEmptyAgain) { … }
TEST(LinkedList, NodesCanBeReused) { … }
TEST(LinkedList, RemovedNodeHasNullNextPrevious) { … }
TEST(LinkedList, NodeMoveConstructor) { … }
TEST(LinkedListDeathTest, ChecksOnInsertBeforeWhenInList) { … }
TEST(LinkedListDeathTest, ChecksOnInsertAfterWhenInList) { … }
}
}