summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT')
-rw-r--r--llvm/unittests/ADT/CMakeLists.txt1
-rw-r--r--llvm/unittests/ADT/ReverseIterationTest.cpp52
2 files changed, 0 insertions, 53 deletions
diff --git a/llvm/unittests/ADT/CMakeLists.txt b/llvm/unittests/ADT/CMakeLists.txt
index fa977ac5d3f..d0313951dfa 100644
--- a/llvm/unittests/ADT/CMakeLists.txt
+++ b/llvm/unittests/ADT/CMakeLists.txt
@@ -42,7 +42,6 @@ set(ADTSources
PostOrderIteratorTest.cpp
PriorityWorklistTest.cpp
RangeAdapterTest.cpp
- ReverseIterationTest.cpp
SCCIteratorTest.cpp
STLExtrasTest.cpp
ScopeExitTest.cpp
diff --git a/llvm/unittests/ADT/ReverseIterationTest.cpp b/llvm/unittests/ADT/ReverseIterationTest.cpp
deleted file mode 100644
index 1e2dedf083f..00000000000
--- a/llvm/unittests/ADT/ReverseIterationTest.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//===- llvm/unittest/ADT/ReverseIterationTest.cpp ------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// ReverseIteration unit tests.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/SmallPtrSet.h"
-#include "gtest/gtest.h"
-
-#if LLVM_ENABLE_ABI_BREAKING_CHECKS
-using namespace llvm;
-
-TEST(ReverseIterationTest, SmallPtrSetTest) {
-
- SmallPtrSet<void*, 4> Set;
- void *Ptrs[] = { (void*)0x1, (void*)0x2, (void*)0x3, (void*)0x4 };
- void *ReversePtrs[] = { (void*)0x4, (void*)0x3, (void*)0x2, (void*)0x1 };
-
- for (auto *Ptr: Ptrs)
- Set.insert(Ptr);
-
- // Check forward iteration.
- ReverseIterate<bool>::value = false;
- for (const auto &Tuple : zip(Set, Ptrs))
- ASSERT_EQ(std::get<0>(Tuple), std::get<1>(Tuple));
-
- // Check operator++ (post-increment) in forward iteration.
- int i = 0;
- for (auto begin = Set.begin(), end = Set.end();
- begin != end; i++)
- ASSERT_EQ(*begin++, Ptrs[i]);
-
- // Check reverse iteration.
- ReverseIterate<bool>::value = true;
- for (const auto &Tuple : zip(Set, ReversePtrs))
- ASSERT_EQ(std::get<0>(Tuple), std::get<1>(Tuple));
-
- // Check operator++ (post-increment) in reverse iteration.
- i = 0;
- for (auto begin = Set.begin(), end = Set.end();
- begin != end; i++)
- ASSERT_EQ(*begin++, ReversePtrs[i]);
-
-}
-#endif
OpenPOWER on IntegriCloud