[llvm] r292885 - Add test for default construction coverage of DenseSet iterators.

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 21:29:40 PST 2017


Author: dberris
Date: Mon Jan 23 23:29:40 2017
New Revision: 292885

URL: http://llvm.org/viewvc/llvm-project?rev=292885&view=rev
Log:
Add test for default construction coverage of DenseSet iterators.

This is a follow-up to D28999.

Modified:
    llvm/trunk/unittests/ADT/DenseSetTest.cpp

Modified: llvm/trunk/unittests/ADT/DenseSetTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/DenseSetTest.cpp?rev=292885&r1=292884&r2=292885&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/DenseSetTest.cpp (original)
+++ llvm/trunk/unittests/ADT/DenseSetTest.cpp Mon Jan 23 23:29:40 2017
@@ -73,7 +73,7 @@ TYPED_TEST(DenseSetTest, InitializerList
   EXPECT_EQ(0u, set.count(3));
 }
 
-TYPED_TEST(DenseSetTest, ConstIteratorComparison){
+TYPED_TEST(DenseSetTest, ConstIteratorComparison) {
   TypeParam set({1});
   const TypeParam &cset = set;
   EXPECT_EQ(set.begin(), cset.begin());
@@ -82,6 +82,13 @@ TYPED_TEST(DenseSetTest, ConstIteratorCo
   EXPECT_NE(set.begin(), cset.end());
 }
 
+TYPED_TEST(DenseSetTest, DefaultConstruction) {
+  typename TypeParam::iterator I, J;
+  typename TypeParam::const_iterator CI, CJ;
+  EXPECT_EQ(I, J);
+  EXPECT_EQ(CI, CJ);
+}
+
 TYPED_TEST(DenseSetTest, EmptyInitializerList) {
   TypeParam set({});
   EXPECT_EQ(0u, set.size());




More information about the llvm-commits mailing list