ADT/PointerIntPairTest.cpp: Appease msc17.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Mar 2014 02:33:17 +0000 (02:33 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Mar 2014 02:33:17 +0000 (02:33 +0000)
  - Use constructor instead of initializer list.
  - Disable ManyUnusedBits for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203436 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/PointerIntPairTest.cpp

index 3c472b2..296d475 100644 (file)
@@ -19,7 +19,7 @@ class PointerIntPairTest : public testing::Test {
 };
 
 TEST_F(PointerIntPairTest, GetSet) {
 };
 
 TEST_F(PointerIntPairTest, GetSet) {
-  PointerIntPair<PointerIntPairTest *, 2> Pair{this, 1U};
+  PointerIntPair<PointerIntPairTest *, 2> Pair(this, 1U);
   EXPECT_EQ(this, Pair.getPointer());
   EXPECT_EQ(1U, Pair.getInt());
 
   EXPECT_EQ(this, Pair.getPointer());
   EXPECT_EQ(1U, Pair.getInt());
 
@@ -42,6 +42,7 @@ TEST_F(PointerIntPairTest, DefaultInitialize) {
   EXPECT_EQ(0U, Pair.getInt());
 }
 
   EXPECT_EQ(0U, Pair.getInt());
 }
 
+#if !(defined(_MSC_VER) && _MSC_VER==1700)
 TEST_F(PointerIntPairTest, ManyUnusedBits) {
   // In real code this would be a word-sized integer limited to 31 bits.
   struct Fixnum31 {
 TEST_F(PointerIntPairTest, ManyUnusedBits) {
   // In real code this would be a word-sized integer limited to 31 bits.
   struct Fixnum31 {
@@ -70,5 +71,6 @@ TEST_F(PointerIntPairTest, ManyUnusedBits) {
   EXPECT_EQ(FixnumPointerTraits::NumLowBitsAvailable - 1,
             PointerLikeTypeTraits<decltype(pair)>::NumLowBitsAvailable);
 }
   EXPECT_EQ(FixnumPointerTraits::NumLowBitsAvailable - 1,
             PointerLikeTypeTraits<decltype(pair)>::NumLowBitsAvailable);
 }
+#endif
 
 } // end anonymous namespace
 
 } // end anonymous namespace