From c8785a980779715c749483d0bb9629eeda07ecfa Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 16 Jun 2012 09:44:00 +0000 Subject: [PATCH] Relax one assertion -- long double has strange alignments on lots of platforms. Also, remove one assertion on MSVC because it produces a completely preposterous result, claiming something needs 12-byte alignment. llvm-svn: 158599 --- unittests/Support/AlignOfTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp index c413451f904..461b1d67e06 100644 --- a/unittests/Support/AlignOfTest.cpp +++ b/unittests/Support/AlignOfTest.cpp @@ -139,7 +139,7 @@ TEST(AlignOfTest, BasicAlignmentInvariants) { EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); - EXPECT_LE(alignOf(), alignOf()); + EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); EXPECT_EQ(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); @@ -246,7 +246,12 @@ TEST(AlignOfTest, BasicAlignedArray) { EXPECT_EQ(alignOf(), alignOf::union_type>()); EXPECT_EQ(alignOf(), alignOf::union_type>()); EXPECT_EQ(alignOf(), alignOf::union_type>()); + + // Some versions of MSVC get this wrong somewhat disturbingly. The failure + // appears to be benign: alignOf() produces a preposterous value: 12 +#ifndef _MSC_VER EXPECT_EQ(alignOf(), alignOf::union_type>()); +#endif } }