//===- llvm/unittest/ADT/SmallPtrSetTest.cpp ------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // // SmallPtrSet unit tests. // //===----------------------------------------------------------------------===// #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/PointerLikeTypeTraits.h" #include "gmock/gmock.h" #include "gtest/gtest.h" usingnamespacellvm; UnorderedElementsAre; TEST(SmallPtrSetTest, Assignment) { … } TEST(SmallPtrSetTest, GrowthTest) { … } TEST(SmallPtrSetTest, CopyAndMoveTest) { … } TEST(SmallPtrSetTest, SwapTest) { … } // Verify that dereferencing and iteration work. TEST(SmallPtrSetTest, dereferenceAndIterate) { … } // Verify that const pointers work for count and find even when the underlying // SmallPtrSet is not for a const pointer type. TEST(SmallPtrSetTest, ConstTest) { … } // Verify that we automatically get the const version of PointerLikeTypeTraits // filled in for us, even for a non-pointer type TestPair; TEST(SmallPtrSetTest, ConstNonPtrTest) { … } // Test equality comparison. TEST(SmallPtrSetTest, EqualityComparison) { … } TEST(SmallPtrSetTest, Contains) { … } TEST(SmallPtrSetTest, InsertIterator) { … } TEST(SmallPtrSetTest, RemoveIf) { … } TEST(SmallPtrSetTest, Reserve) { … }