From fd2b40efd7687621a7c849556a089ce4a610aafd Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 16 Jun 2012 09:44:00 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158599 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/AlignOfTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'unittests/Support/AlignOfTest.cpp') diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp index c413451f90..461b1d67e0 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 } } -- cgit v1.2.3