//==- unittests/ADT/IListIteratorBitsTest.cpp - ilist_iterator_w_bits tests -=// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/ADT/simple_ilist.h" #include "gtest/gtest.h" // Test that ilist_iterator_w_bits can be used to store extra information about // what we're iterating over, that it's only enabled when given the relevant // option, and it can be fed into various iteration utilities. usingnamespacellvm; namespace { class dummy; struct Node : ilist_node<Node, ilist_iterator_bits<true>> { … }; struct PlainNode : ilist_node<PlainNode> { … }; class Parent { … }; struct ParentNode : ilist_node<ParentNode, ilist_iterator_bits<true>, ilist_parent<Parent>> { … }; TEST(IListIteratorBitsTest, DefaultConstructor) { … } TEST(IListIteratorBitsTest, ConsAndAssignment) { … } class dummy { … }; TEST(IListIteratorBitsTest, RangeIteration) { … } TEST(IListIteratorBitsTest, GetParent) { … } } // end namespace