#include "llvm/ADT/ilist.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ilist_node.h"
#include "gtest/gtest.h"
#include <ostream>
usingnamespacellvm;
namespace {
struct Node : ilist_node<Node> { … };
TEST(IListTest, Basic) { … }
TEST(IListTest, cloneFrom) { … }
TEST(IListTest, SpliceOne) { … }
TEST(IListTest, SpliceSwap) { … }
TEST(IListTest, SpliceSwapOtherWay) { … }
TEST(IListTest, UnsafeClear) { … }
struct NodeWithCallback : ilist_node<NodeWithCallback> { … };
}
namespace llvm {
template <> struct ilist_alloc_traits<NodeWithCallback> { … };
template <> struct ilist_callback_traits<NodeWithCallback> { … };
}
namespace {
TEST(IListTest, addNodeToList) { … }
TEST(IListTest, sameListSplice) { … }
struct PrivateNode : private ilist_node<PrivateNode> { … };
TEST(IListTest, privateNode) { … }
}