Bug Summary

File:unittests/ADT/APIntTest.cpp
Location:line 751, column 3
Description:Function call argument is an uninitialized value

Annotated Source Code

1//===- llvm/unittest/ADT/APInt.cpp - APInt unit tests ---------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "llvm/ADT/APInt.h"
11#include "llvm/ADT/SmallString.h"
12#include "gtest/gtest.h"
13#include <array>
14#include <ostream>
15
16using namespace llvm;
17
18namespace {
19
20TEST(APIntTest, ValueInit)class APIntTest_ValueInit_Test : public ::testing::Test { public
: APIntTest_ValueInit_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_ValueInit_Test(APIntTest_ValueInit_Test
const &); void operator=(APIntTest_ValueInit_Test const &
);};::testing::TestInfo* const APIntTest_ValueInit_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"ValueInit", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_ValueInit_Test
>);void APIntTest_ValueInit_Test::TestBody()
{
21 APInt Zero = APInt();
22 EXPECT_TRUE(!Zero)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!Zero)) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 22, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!Zero", "false", "true").c_str()) = ::testing::Message()
;
23 EXPECT_TRUE(!Zero.zext(64))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!Zero.zext(64))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 23, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!Zero.zext(64)", "false", "true").c_str()) = ::testing::Message
()
;
24 EXPECT_TRUE(!Zero.sext(64))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!Zero.sext(64))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 24, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!Zero.sext(64)", "false", "true").c_str()) = ::testing::Message
()
;
25}
26
27// Test that APInt shift left works when bitwidth > 64 and shiftamt == 0
28TEST(APIntTest, ShiftLeftByZero)class APIntTest_ShiftLeftByZero_Test : public ::testing::Test
{ public: APIntTest_ShiftLeftByZero_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_ShiftLeftByZero_Test(APIntTest_ShiftLeftByZero_Test
const &); void operator=(APIntTest_ShiftLeftByZero_Test const
&);};::testing::TestInfo* const APIntTest_ShiftLeftByZero_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "ShiftLeftByZero", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_ShiftLeftByZero_Test>);void APIntTest_ShiftLeftByZero_Test
::TestBody()
{
29 APInt One = APInt::getNullValue(65) + 1;
30 APInt Shl = One.shl(0);
31 EXPECT_TRUE(Shl[0])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Shl[0])) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 31, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Shl[0]", "false", "true").c_str()) = ::testing::Message()
;
32 EXPECT_FALSE(Shl[1])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(Shl[1]))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 32, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Shl[1]", "true", "false").c_str()) = ::testing::Message()
;
33}
34
35TEST(APIntTest, i128_NegativeCount)class APIntTest_i128_NegativeCount_Test : public ::testing::Test
{ public: APIntTest_i128_NegativeCount_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_i128_NegativeCount_Test(
APIntTest_i128_NegativeCount_Test const &); void operator
=(APIntTest_i128_NegativeCount_Test const &);};::testing::
TestInfo* const APIntTest_i128_NegativeCount_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"i128_NegativeCount", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_i128_NegativeCount_Test>);void APIntTest_i128_NegativeCount_Test
::TestBody()
{
36 APInt Minus3(128, static_cast<uint64_t>(-3), true);
37 EXPECT_EQ(126u, Minus3.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(126u)) == 1)>::Compare("126u"
, "Minus3.countLeadingOnes()", 126u, Minus3.countLeadingOnes(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 37, gtest_ar.failure_message()) = ::testing::Message()
;
38 EXPECT_EQ(-3, Minus3.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-3)) == 1)>::Compare("-3",
"Minus3.getSExtValue()", -3, Minus3.getSExtValue()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 38, gtest_ar.failure_message()) = ::testing::Message()
;
39
40 APInt Minus1(128, static_cast<uint64_t>(-1), true);
41 EXPECT_EQ(0u, Minus1.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"Minus1.countLeadingZeros()", 0u, Minus1.countLeadingZeros()
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 41, gtest_ar.failure_message()) = ::testing::Message()
;
42 EXPECT_EQ(128u, Minus1.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "Minus1.countLeadingOnes()", 128u, Minus1.countLeadingOnes(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 42, gtest_ar.failure_message()) = ::testing::Message()
;
43 EXPECT_EQ(128u, Minus1.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "Minus1.getActiveBits()", 128u, Minus1.getActiveBits()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 43, gtest_ar.failure_message()) = ::testing::Message()
;
44 EXPECT_EQ(0u, Minus1.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"Minus1.countTrailingZeros()", 0u, Minus1.countTrailingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 44, gtest_ar.failure_message()) = ::testing::Message()
;
45 EXPECT_EQ(128u, Minus1.countTrailingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "Minus1.countTrailingOnes()", 128u, Minus1.countTrailingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 45, gtest_ar.failure_message()) = ::testing::Message()
;
46 EXPECT_EQ(128u, Minus1.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "Minus1.countPopulation()", 128u, Minus1.countPopulation())
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 46, gtest_ar.failure_message()) = ::testing::Message()
;
47 EXPECT_EQ(-1, Minus1.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-1)) == 1)>::Compare("-1",
"Minus1.getSExtValue()", -1, Minus1.getSExtValue()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 47, gtest_ar.failure_message()) = ::testing::Message()
;
48}
49
50// XFAIL this test on FreeBSD where the system gcc-4.2.1 seems to miscompile it.
51#if defined(__llvm__1) || !defined(__FreeBSD__)
52
53TEST(APIntTest, i33_Count)class APIntTest_i33_Count_Test : public ::testing::Test { public
: APIntTest_i33_Count_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_i33_Count_Test(APIntTest_i33_Count_Test
const &); void operator=(APIntTest_i33_Count_Test const &
);};::testing::TestInfo* const APIntTest_i33_Count_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"i33_Count", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_i33_Count_Test
>);void APIntTest_i33_Count_Test::TestBody()
{
54 APInt i33minus2(33, static_cast<uint64_t>(-2), true);
55 EXPECT_EQ(0u, i33minus2.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"i33minus2.countLeadingZeros()", 0u, i33minus2.countLeadingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 55, gtest_ar.failure_message()) = ::testing::Message()
;
56 EXPECT_EQ(32u, i33minus2.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(32u)) == 1)>::Compare("32u"
, "i33minus2.countLeadingOnes()", 32u, i33minus2.countLeadingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 56, gtest_ar.failure_message()) = ::testing::Message()
;
57 EXPECT_EQ(33u, i33minus2.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(33u)) == 1)>::Compare("33u"
, "i33minus2.getActiveBits()", 33u, i33minus2.getActiveBits()
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 57, gtest_ar.failure_message()) = ::testing::Message()
;
58 EXPECT_EQ(1u, i33minus2.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"i33minus2.countTrailingZeros()", 1u, i33minus2.countTrailingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 58, gtest_ar.failure_message()) = ::testing::Message()
;
59 EXPECT_EQ(32u, i33minus2.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(32u)) == 1)>::Compare("32u"
, "i33minus2.countPopulation()", 32u, i33minus2.countPopulation
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 59, gtest_ar.failure_message()) = ::testing::Message()
;
60 EXPECT_EQ(-2, i33minus2.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-2)) == 1)>::Compare("-2",
"i33minus2.getSExtValue()", -2, i33minus2.getSExtValue()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 60, gtest_ar.failure_message()) = ::testing::Message()
;
61 EXPECT_EQ(((uint64_t)-2)&((1ull<<33) -1), i33minus2.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(((uint64_t)-2)&((1ull<<
33) -1))) == 1)>::Compare("((uint64_t)-2)&((1ull<<33) -1)"
, "i33minus2.getZExtValue()", ((uint64_t)-2)&((1ull<<
33) -1), i33minus2.getZExtValue()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 61, gtest_ar.failure_message()) = ::testing::Message()
;
62}
63
64#endif
65
66TEST(APIntTest, i65_Count)class APIntTest_i65_Count_Test : public ::testing::Test { public
: APIntTest_i65_Count_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_i65_Count_Test(APIntTest_i65_Count_Test
const &); void operator=(APIntTest_i65_Count_Test const &
);};::testing::TestInfo* const APIntTest_i65_Count_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"i65_Count", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_i65_Count_Test
>);void APIntTest_i65_Count_Test::TestBody()
{
67 APInt i65(65, 0, true);
68 EXPECT_EQ(65u, i65.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(65u)) == 1)>::Compare("65u"
, "i65.countLeadingZeros()", 65u, i65.countLeadingZeros()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 68, gtest_ar.failure_message()) = ::testing::Message()
;
69 EXPECT_EQ(0u, i65.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"i65.countLeadingOnes()", 0u, i65.countLeadingOnes()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 69, gtest_ar.failure_message()) = ::testing::Message()
;
70 EXPECT_EQ(0u, i65.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"i65.getActiveBits()", 0u, i65.getActiveBits()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 70, gtest_ar.failure_message()) = ::testing::Message()
;
71 EXPECT_EQ(1u, i65.getActiveWords())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"i65.getActiveWords()", 1u, i65.getActiveWords()))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 71, gtest_ar.failure_message()) = ::testing::Message()
;
72 EXPECT_EQ(65u, i65.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(65u)) == 1)>::Compare("65u"
, "i65.countTrailingZeros()", 65u, i65.countTrailingZeros()))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 72, gtest_ar.failure_message()) = ::testing::Message()
;
73 EXPECT_EQ(0u, i65.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"i65.countPopulation()", 0u, i65.countPopulation()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 73, gtest_ar.failure_message()) = ::testing::Message()
;
74
75 APInt i65minus(65, 0, true);
76 i65minus.setBit(64);
77 EXPECT_EQ(0u, i65minus.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"i65minus.countLeadingZeros()", 0u, i65minus.countLeadingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 77, gtest_ar.failure_message()) = ::testing::Message()
;
78 EXPECT_EQ(1u, i65minus.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"i65minus.countLeadingOnes()", 1u, i65minus.countLeadingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 78, gtest_ar.failure_message()) = ::testing::Message()
;
79 EXPECT_EQ(65u, i65minus.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(65u)) == 1)>::Compare("65u"
, "i65minus.getActiveBits()", 65u, i65minus.getActiveBits()))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 79, gtest_ar.failure_message()) = ::testing::Message()
;
80 EXPECT_EQ(64u, i65minus.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(64u)) == 1)>::Compare("64u"
, "i65minus.countTrailingZeros()", 64u, i65minus.countTrailingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 80, gtest_ar.failure_message()) = ::testing::Message()
;
81 EXPECT_EQ(1u, i65minus.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"i65minus.countPopulation()", 1u, i65minus.countPopulation()
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 81, gtest_ar.failure_message()) = ::testing::Message()
;
82}
83
84TEST(APIntTest, i128_PositiveCount)class APIntTest_i128_PositiveCount_Test : public ::testing::Test
{ public: APIntTest_i128_PositiveCount_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_i128_PositiveCount_Test(
APIntTest_i128_PositiveCount_Test const &); void operator
=(APIntTest_i128_PositiveCount_Test const &);};::testing::
TestInfo* const APIntTest_i128_PositiveCount_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"i128_PositiveCount", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_i128_PositiveCount_Test>);void APIntTest_i128_PositiveCount_Test
::TestBody()
{
85 APInt u128max = APInt::getAllOnesValue(128);
86 EXPECT_EQ(128u, u128max.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "u128max.countLeadingOnes()", 128u, u128max.countLeadingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 86, gtest_ar.failure_message()) = ::testing::Message()
;
87 EXPECT_EQ(0u, u128max.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"u128max.countLeadingZeros()", 0u, u128max.countLeadingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 87, gtest_ar.failure_message()) = ::testing::Message()
;
88 EXPECT_EQ(128u, u128max.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "u128max.getActiveBits()", 128u, u128max.getActiveBits())))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 88, gtest_ar.failure_message()) = ::testing::Message()
;
89 EXPECT_EQ(0u, u128max.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"u128max.countTrailingZeros()", 0u, u128max.countTrailingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 89, gtest_ar.failure_message()) = ::testing::Message()
;
90 EXPECT_EQ(128u, u128max.countTrailingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "u128max.countTrailingOnes()", 128u, u128max.countTrailingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 90, gtest_ar.failure_message()) = ::testing::Message()
;
91 EXPECT_EQ(128u, u128max.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "u128max.countPopulation()", 128u, u128max.countPopulation(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 91, gtest_ar.failure_message()) = ::testing::Message()
;
92
93 APInt u64max(128, static_cast<uint64_t>(-1), false);
94 EXPECT_EQ(64u, u64max.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(64u)) == 1)>::Compare("64u"
, "u64max.countLeadingZeros()", 64u, u64max.countLeadingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 94, gtest_ar.failure_message()) = ::testing::Message()
;
95 EXPECT_EQ(0u, u64max.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"u64max.countLeadingOnes()", 0u, u64max.countLeadingOnes()))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 95, gtest_ar.failure_message()) = ::testing::Message()
;
96 EXPECT_EQ(64u, u64max.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(64u)) == 1)>::Compare("64u"
, "u64max.getActiveBits()", 64u, u64max.getActiveBits()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 96, gtest_ar.failure_message()) = ::testing::Message()
;
97 EXPECT_EQ(0u, u64max.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"u64max.countTrailingZeros()", 0u, u64max.countTrailingZeros
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 97, gtest_ar.failure_message()) = ::testing::Message()
;
98 EXPECT_EQ(64u, u64max.countTrailingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(64u)) == 1)>::Compare("64u"
, "u64max.countTrailingOnes()", 64u, u64max.countTrailingOnes
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 98, gtest_ar.failure_message()) = ::testing::Message()
;
99 EXPECT_EQ(64u, u64max.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(64u)) == 1)>::Compare("64u"
, "u64max.countPopulation()", 64u, u64max.countPopulation()))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 99, gtest_ar.failure_message()) = ::testing::Message()
;
100 EXPECT_EQ((uint64_t)~0ull, u64max.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper((uint64_t)~0ull)) == 1)>::
Compare("(uint64_t)~0ull", "u64max.getZExtValue()", (uint64_t
)~0ull, u64max.getZExtValue()))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 100, gtest_ar.failure_message()) = ::testing::Message()
;
101
102 APInt zero(128, 0, true);
103 EXPECT_EQ(128u, zero.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "zero.countLeadingZeros()", 128u, zero.countLeadingZeros())
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 103, gtest_ar.failure_message()) = ::testing::Message()
;
104 EXPECT_EQ(0u, zero.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.countLeadingOnes()", 0u, zero.countLeadingOnes()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 104, gtest_ar.failure_message()) = ::testing::Message()
;
105 EXPECT_EQ(0u, zero.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.getActiveBits()", 0u, zero.getActiveBits()))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 105, gtest_ar.failure_message()) = ::testing::Message()
;
106 EXPECT_EQ(128u, zero.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "zero.countTrailingZeros()", 128u, zero.countTrailingZeros(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 106, gtest_ar.failure_message()) = ::testing::Message()
;
107 EXPECT_EQ(0u, zero.countTrailingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.countTrailingOnes()", 0u, zero.countTrailingOnes()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 107, gtest_ar.failure_message()) = ::testing::Message()
;
108 EXPECT_EQ(0u, zero.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.countPopulation()", 0u, zero.countPopulation()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 108, gtest_ar.failure_message()) = ::testing::Message()
;
109 EXPECT_EQ(0u, zero.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.getSExtValue()", 0u, zero.getSExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 109, gtest_ar.failure_message()) = ::testing::Message()
;
110 EXPECT_EQ(0u, zero.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.getZExtValue()", 0u, zero.getZExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 110, gtest_ar.failure_message()) = ::testing::Message()
;
111
112 APInt one(128, 1, true);
113 EXPECT_EQ(127u, one.countLeadingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(127u)) == 1)>::Compare("127u"
, "one.countLeadingZeros()", 127u, one.countLeadingZeros())))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 113, gtest_ar.failure_message()) = ::testing::Message()
;
114 EXPECT_EQ(0u, one.countLeadingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"one.countLeadingOnes()", 0u, one.countLeadingOnes()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 114, gtest_ar.failure_message()) = ::testing::Message()
;
115 EXPECT_EQ(1u, one.getActiveBits())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"one.getActiveBits()", 1u, one.getActiveBits()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 115, gtest_ar.failure_message()) = ::testing::Message()
;
116 EXPECT_EQ(0u, one.countTrailingZeros())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"one.countTrailingZeros()", 0u, one.countTrailingZeros()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 116, gtest_ar.failure_message()) = ::testing::Message()
;
117 EXPECT_EQ(1u, one.countTrailingOnes())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"one.countTrailingOnes()", 1u, one.countTrailingOnes()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 117, gtest_ar.failure_message()) = ::testing::Message()
;
118 EXPECT_EQ(1u, one.countPopulation())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"one.countPopulation()", 1u, one.countPopulation()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 118, gtest_ar.failure_message()) = ::testing::Message()
;
119 EXPECT_EQ(1, one.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1)) == 1)>::Compare("1", "one.getSExtValue()"
, 1, one.getSExtValue()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 119, gtest_ar.failure_message()) = ::testing::Message()
;
120 EXPECT_EQ(1u, one.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"one.getZExtValue()", 1u, one.getZExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 120, gtest_ar.failure_message()) = ::testing::Message()
;
121}
122
123TEST(APIntTest, i1)class APIntTest_i1_Test : public ::testing::Test { public: APIntTest_i1_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); APIntTest_i1_Test
(APIntTest_i1_Test const &); void operator=(APIntTest_i1_Test
const &);};::testing::TestInfo* const APIntTest_i1_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "APIntTest"
, "i1", __null, __null, (::testing::internal::GetTestTypeId()
), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_i1_Test
>);void APIntTest_i1_Test::TestBody()
{
124 const APInt neg_two(1, static_cast<uint64_t>(-2), true);
125 const APInt neg_one(1, static_cast<uint64_t>(-1), true);
126 const APInt zero(1, 0);
127 const APInt one(1, 1);
128 const APInt two(1, 2);
129
130 EXPECT_EQ(0, neg_two.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0)) == 1)>::Compare("0", "neg_two.getSExtValue()"
, 0, neg_two.getSExtValue()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 130, gtest_ar.failure_message()) = ::testing::Message()
;
131 EXPECT_EQ(-1, neg_one.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-1)) == 1)>::Compare("-1",
"neg_one.getSExtValue()", -1, neg_one.getSExtValue()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 131, gtest_ar.failure_message()) = ::testing::Message()
;
132 EXPECT_EQ(1u, neg_one.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"neg_one.getZExtValue()", 1u, neg_one.getZExtValue()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 132, gtest_ar.failure_message()) = ::testing::Message()
;
133 EXPECT_EQ(0u, zero.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"zero.getZExtValue()", 0u, zero.getZExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 133, gtest_ar.failure_message()) = ::testing::Message()
;
134 EXPECT_EQ(-1, one.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-1)) == 1)>::Compare("-1",
"one.getSExtValue()", -1, one.getSExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 134, gtest_ar.failure_message()) = ::testing::Message()
;
135 EXPECT_EQ(1u, one.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"one.getZExtValue()", 1u, one.getZExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 135, gtest_ar.failure_message()) = ::testing::Message()
;
136 EXPECT_EQ(0u, two.getZExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"two.getZExtValue()", 0u, two.getZExtValue()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 136, gtest_ar.failure_message()) = ::testing::Message()
;
137 EXPECT_EQ(0, two.getSExtValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0)) == 1)>::Compare("0", "two.getSExtValue()"
, 0, two.getSExtValue()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 137, gtest_ar.failure_message()) = ::testing::Message()
;
138
139 // Basic equalities for 1-bit values.
140 EXPECT_EQ(zero, two)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "two", zero, two))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 140, gtest_ar.failure_message()) = ::testing::Message()
;
141 EXPECT_EQ(zero, neg_two)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "neg_two", zero, neg_two))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 141, gtest_ar.failure_message()) = ::testing::Message()
;
142 EXPECT_EQ(one, neg_one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "neg_one", one, neg_one))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 142, gtest_ar.failure_message()) = ::testing::Message()
;
143 EXPECT_EQ(two, neg_two)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(two)) == 1)>::Compare("two"
, "neg_two", two, neg_two))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 143, gtest_ar.failure_message()) = ::testing::Message()
;
144
145 // Min/max signed values.
146 EXPECT_TRUE(zero.isMaxSignedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(zero.isMaxSignedValue
())) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 146, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "zero.isMaxSignedValue()", "false", "true").c_str()) = ::testing
::Message()
;
147 EXPECT_FALSE(one.isMaxSignedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(one.isMaxSignedValue
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 147, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "one.isMaxSignedValue()", "true", "false").c_str()) = ::testing
::Message()
;
148 EXPECT_FALSE(zero.isMinSignedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(zero.isMinSignedValue
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 148, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "zero.isMinSignedValue()", "true", "false").c_str()) = ::testing
::Message()
;
149 EXPECT_TRUE(one.isMinSignedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(one.isMinSignedValue(
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 149, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "one.isMinSignedValue()", "false", "true").c_str()) = ::testing
::Message()
;
150
151 // Additions.
152 EXPECT_EQ(two, one + one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(two)) == 1)>::Compare("two"
, "one + one", two, one + one))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 152, gtest_ar.failure_message()) = ::testing::Message()
;
153 EXPECT_EQ(zero, neg_one + one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "neg_one + one", zero, neg_one + one))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 153, gtest_ar.failure_message()) = ::testing::Message()
;
154 EXPECT_EQ(neg_two, neg_one + neg_one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_two)) == 1)>::Compare(
"neg_two", "neg_one + neg_one", neg_two, neg_one + neg_one)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 154, gtest_ar.failure_message()) = ::testing::Message()
;
155
156 // Subtractions.
157 EXPECT_EQ(neg_two, neg_one - one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_two)) == 1)>::Compare(
"neg_two", "neg_one - one", neg_two, neg_one - one))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 157, gtest_ar.failure_message()) = ::testing::Message()
;
158 EXPECT_EQ(two, one - neg_one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(two)) == 1)>::Compare("two"
, "one - neg_one", two, one - neg_one))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 158, gtest_ar.failure_message()) = ::testing::Message()
;
159 EXPECT_EQ(zero, one - one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one - one", zero, one - one))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 159, gtest_ar.failure_message()) = ::testing::Message()
;
160
161 // Shifts.
162 EXPECT_EQ(zero, one << one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one << one", zero, one << one))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 162, gtest_ar.failure_message()) = ::testing::Message()
;
163 EXPECT_EQ(one, one << zero)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one << zero", one, one << zero))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 163, gtest_ar.failure_message()) = ::testing::Message()
;
164 EXPECT_EQ(zero, one.shl(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one.shl(1)", zero, one.shl(1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 164, gtest_ar.failure_message()) = ::testing::Message()
;
165 EXPECT_EQ(one, one.shl(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.shl(0)", one, one.shl(0)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 165, gtest_ar.failure_message()) = ::testing::Message()
;
166 EXPECT_EQ(zero, one.lshr(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one.lshr(1)", zero, one.lshr(1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 166, gtest_ar.failure_message()) = ::testing::Message()
;
167 EXPECT_EQ(zero, one.ashr(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one.ashr(1)", zero, one.ashr(1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 167, gtest_ar.failure_message()) = ::testing::Message()
;
168
169 // Rotates.
170 EXPECT_EQ(one, one.rotl(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.rotl(0)", one, one.rotl(0)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 170, gtest_ar.failure_message()) = ::testing::Message()
;
171 EXPECT_EQ(one, one.rotl(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.rotl(1)", one, one.rotl(1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 171, gtest_ar.failure_message()) = ::testing::Message()
;
172 EXPECT_EQ(one, one.rotr(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.rotr(0)", one, one.rotr(0)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 172, gtest_ar.failure_message()) = ::testing::Message()
;
173 EXPECT_EQ(one, one.rotr(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.rotr(1)", one, one.rotr(1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 173, gtest_ar.failure_message()) = ::testing::Message()
;
174
175 // Multiplies.
176 EXPECT_EQ(neg_one, neg_one * one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "neg_one * one", neg_one, neg_one * one))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 176, gtest_ar.failure_message()) = ::testing::Message()
;
177 EXPECT_EQ(neg_one, one * neg_one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "one * neg_one", neg_one, one * neg_one))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 177, gtest_ar.failure_message()) = ::testing::Message()
;
178 EXPECT_EQ(one, neg_one * neg_one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "neg_one * neg_one", one, neg_one * neg_one))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 178, gtest_ar.failure_message()) = ::testing::Message()
;
179 EXPECT_EQ(one, one * one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one * one", one, one * one))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 179, gtest_ar.failure_message()) = ::testing::Message()
;
180
181 // Divides.
182 EXPECT_EQ(neg_one, one.sdiv(neg_one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "one.sdiv(neg_one)", neg_one, one.sdiv(neg_one))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 182, gtest_ar.failure_message()) = ::testing::Message()
;
183 EXPECT_EQ(neg_one, neg_one.sdiv(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "neg_one.sdiv(one)", neg_one, neg_one.sdiv(one))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 183, gtest_ar.failure_message()) = ::testing::Message()
;
184 EXPECT_EQ(one, neg_one.sdiv(neg_one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "neg_one.sdiv(neg_one)", one, neg_one.sdiv(neg_one)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 184, gtest_ar.failure_message()) = ::testing::Message()
;
185 EXPECT_EQ(one, one.sdiv(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.sdiv(one)", one, one.sdiv(one)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 185, gtest_ar.failure_message()) = ::testing::Message()
;
186
187 EXPECT_EQ(neg_one, one.udiv(neg_one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "one.udiv(neg_one)", neg_one, one.udiv(neg_one))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 187, gtest_ar.failure_message()) = ::testing::Message()
;
188 EXPECT_EQ(neg_one, neg_one.udiv(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(neg_one)) == 1)>::Compare(
"neg_one", "neg_one.udiv(one)", neg_one, neg_one.udiv(one))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 188, gtest_ar.failure_message()) = ::testing::Message()
;
189 EXPECT_EQ(one, neg_one.udiv(neg_one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "neg_one.udiv(neg_one)", one, neg_one.udiv(neg_one)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 189, gtest_ar.failure_message()) = ::testing::Message()
;
190 EXPECT_EQ(one, one.udiv(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "one.udiv(one)", one, one.udiv(one)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 190, gtest_ar.failure_message()) = ::testing::Message()
;
191
192 // Remainders.
193 EXPECT_EQ(zero, neg_one.srem(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "neg_one.srem(one)", zero, neg_one.srem(one)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 193, gtest_ar.failure_message()) = ::testing::Message()
;
194 EXPECT_EQ(zero, neg_one.urem(one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "neg_one.urem(one)", zero, neg_one.urem(one)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 194, gtest_ar.failure_message()) = ::testing::Message()
;
195 EXPECT_EQ(zero, one.srem(neg_one))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(zero)) == 1)>::Compare("zero"
, "one.srem(neg_one)", zero, one.srem(neg_one)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 195, gtest_ar.failure_message()) = ::testing::Message()
;
196
197 // sdivrem
198 {
199 APInt q(8, 0);
200 APInt r(8, 0);
201 APInt one(8, 1);
202 APInt two(8, 2);
203 APInt nine(8, 9);
204 APInt four(8, 4);
205
206 EXPECT_EQ(nine.srem(two), one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(nine.srem(two))) == 1)>::Compare
("nine.srem(two)", "one", nine.srem(two), one))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 206, gtest_ar.failure_message()) = ::testing::Message()
;
207 EXPECT_EQ(nine.srem(-two), one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(nine.srem(-two))) == 1)>::
Compare("nine.srem(-two)", "one", nine.srem(-two), one))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 207, gtest_ar.failure_message()) = ::testing::Message()
;
208 EXPECT_EQ((-nine).srem(two), -one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper((-nine).srem(two))) == 1)>
::Compare("(-nine).srem(two)", "-one", (-nine).srem(two), -one
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 208, gtest_ar.failure_message()) = ::testing::Message()
;
209 EXPECT_EQ((-nine).srem(-two), -one)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper((-nine).srem(-two))) == 1)>
::Compare("(-nine).srem(-two)", "-one", (-nine).srem(-two), -
one))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 209, gtest_ar.failure_message()) = ::testing::Message()
;
210
211 APInt::sdivrem(nine, two, q, r);
212 EXPECT_EQ(four, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(four)) == 1)>::Compare("four"
, "q", four, q))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 212, gtest_ar.failure_message()) = ::testing::Message()
;
213 EXPECT_EQ(one, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "r", one, r))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 213, gtest_ar.failure_message()) = ::testing::Message()
;
214 APInt::sdivrem(-nine, two, q, r);
215 EXPECT_EQ(-four, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-four)) == 1)>::Compare("-four"
, "q", -four, q))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 215, gtest_ar.failure_message()) = ::testing::Message()
;
216 EXPECT_EQ(-one, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-one)) == 1)>::Compare("-one"
, "r", -one, r))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 216, gtest_ar.failure_message()) = ::testing::Message()
;
217 APInt::sdivrem(nine, -two, q, r);
218 EXPECT_EQ(-four, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-four)) == 1)>::Compare("-four"
, "q", -four, q))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 218, gtest_ar.failure_message()) = ::testing::Message()
;
219 EXPECT_EQ(one, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(one)) == 1)>::Compare("one"
, "r", one, r))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 219, gtest_ar.failure_message()) = ::testing::Message()
;
220 APInt::sdivrem(-nine, -two, q, r);
221 EXPECT_EQ(four, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(four)) == 1)>::Compare("four"
, "q", four, q))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 221, gtest_ar.failure_message()) = ::testing::Message()
;
222 EXPECT_EQ(-one, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(-one)) == 1)>::Compare("-one"
, "r", -one, r))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 222, gtest_ar.failure_message()) = ::testing::Message()
;
223 }
224}
225
226TEST(APIntTest, compare)class APIntTest_compare_Test : public ::testing::Test { public
: APIntTest_compare_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_compare_Test(APIntTest_compare_Test const
&); void operator=(APIntTest_compare_Test const &);}
;::testing::TestInfo* const APIntTest_compare_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"compare", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_compare_Test
>);void APIntTest_compare_Test::TestBody()
{
227 std::array<APInt, 5> testVals{{
228 APInt{16, 2},
229 APInt{16, 1},
230 APInt{16, 0},
231 APInt{16, (uint64_t)-1, true},
232 APInt{16, (uint64_t)-2, true},
233 }};
234
235 for (auto &arg1 : testVals)
236 for (auto &arg2 : testVals) {
237 auto uv1 = arg1.getZExtValue();
238 auto uv2 = arg2.getZExtValue();
239 auto sv1 = arg1.getSExtValue();
240 auto sv2 = arg2.getSExtValue();
241
242 EXPECT_EQ(uv1 < uv2, arg1.ult(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 < uv2)) == 1)>::Compare
("uv1 < uv2", "arg1.ult(arg2)", uv1 < uv2, arg1.ult(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 242, gtest_ar.failure_message()) = ::testing::Message()
;
243 EXPECT_EQ(uv1 <= uv2, arg1.ule(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 <= uv2)) == 1)>::Compare
("uv1 <= uv2", "arg1.ule(arg2)", uv1 <= uv2, arg1.ule(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 243, gtest_ar.failure_message()) = ::testing::Message()
;
244 EXPECT_EQ(uv1 > uv2, arg1.ugt(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 > uv2)) == 1)>::Compare
("uv1 > uv2", "arg1.ugt(arg2)", uv1 > uv2, arg1.ugt(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 244, gtest_ar.failure_message()) = ::testing::Message()
;
245 EXPECT_EQ(uv1 >= uv2, arg1.uge(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 >= uv2)) == 1)>::Compare
("uv1 >= uv2", "arg1.uge(arg2)", uv1 >= uv2, arg1.uge(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 245, gtest_ar.failure_message()) = ::testing::Message()
;
246
247 EXPECT_EQ(sv1 < sv2, arg1.slt(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 < sv2)) == 1)>::Compare
("sv1 < sv2", "arg1.slt(arg2)", sv1 < sv2, arg1.slt(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 247, gtest_ar.failure_message()) = ::testing::Message()
;
248 EXPECT_EQ(sv1 <= sv2, arg1.sle(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 <= sv2)) == 1)>::Compare
("sv1 <= sv2", "arg1.sle(arg2)", sv1 <= sv2, arg1.sle(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 248, gtest_ar.failure_message()) = ::testing::Message()
;
249 EXPECT_EQ(sv1 > sv2, arg1.sgt(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 > sv2)) == 1)>::Compare
("sv1 > sv2", "arg1.sgt(arg2)", sv1 > sv2, arg1.sgt(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 249, gtest_ar.failure_message()) = ::testing::Message()
;
250 EXPECT_EQ(sv1 >= sv2, arg1.sge(arg2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 >= sv2)) == 1)>::Compare
("sv1 >= sv2", "arg1.sge(arg2)", sv1 >= sv2, arg1.sge(arg2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 250, gtest_ar.failure_message()) = ::testing::Message()
;
251
252 EXPECT_EQ(uv1 < uv2, arg1.ult(uv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 < uv2)) == 1)>::Compare
("uv1 < uv2", "arg1.ult(uv2)", uv1 < uv2, arg1.ult(uv2)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 252, gtest_ar.failure_message()) = ::testing::Message()
;
253 EXPECT_EQ(uv1 <= uv2, arg1.ule(uv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 <= uv2)) == 1)>::Compare
("uv1 <= uv2", "arg1.ule(uv2)", uv1 <= uv2, arg1.ule(uv2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 253, gtest_ar.failure_message()) = ::testing::Message()
;
254 EXPECT_EQ(uv1 > uv2, arg1.ugt(uv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 > uv2)) == 1)>::Compare
("uv1 > uv2", "arg1.ugt(uv2)", uv1 > uv2, arg1.ugt(uv2)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 254, gtest_ar.failure_message()) = ::testing::Message()
;
255 EXPECT_EQ(uv1 >= uv2, arg1.uge(uv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(uv1 >= uv2)) == 1)>::Compare
("uv1 >= uv2", "arg1.uge(uv2)", uv1 >= uv2, arg1.uge(uv2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 255, gtest_ar.failure_message()) = ::testing::Message()
;
256
257 EXPECT_EQ(sv1 < sv2, arg1.slt(sv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 < sv2)) == 1)>::Compare
("sv1 < sv2", "arg1.slt(sv2)", sv1 < sv2, arg1.slt(sv2)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 257, gtest_ar.failure_message()) = ::testing::Message()
;
258 EXPECT_EQ(sv1 <= sv2, arg1.sle(sv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 <= sv2)) == 1)>::Compare
("sv1 <= sv2", "arg1.sle(sv2)", sv1 <= sv2, arg1.sle(sv2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 258, gtest_ar.failure_message()) = ::testing::Message()
;
259 EXPECT_EQ(sv1 > sv2, arg1.sgt(sv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 > sv2)) == 1)>::Compare
("sv1 > sv2", "arg1.sgt(sv2)", sv1 > sv2, arg1.sgt(sv2)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 259, gtest_ar.failure_message()) = ::testing::Message()
;
260 EXPECT_EQ(sv1 >= sv2, arg1.sge(sv2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(sv1 >= sv2)) == 1)>::Compare
("sv1 >= sv2", "arg1.sge(sv2)", sv1 >= sv2, arg1.sge(sv2
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 260, gtest_ar.failure_message()) = ::testing::Message()
;
261 }
262}
263
264TEST(APIntTest, compareWithRawIntegers)class APIntTest_compareWithRawIntegers_Test : public ::testing
::Test { public: APIntTest_compareWithRawIntegers_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_compareWithRawIntegers_Test
(APIntTest_compareWithRawIntegers_Test const &); void operator
=(APIntTest_compareWithRawIntegers_Test const &);};::testing
::TestInfo* const APIntTest_compareWithRawIntegers_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"compareWithRawIntegers", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_compareWithRawIntegers_Test>);void APIntTest_compareWithRawIntegers_Test
::TestBody()
{
265 EXPECT_TRUE(!APInt(8, 1).uge(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!APInt(8, 1).uge(256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 265, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!APInt(8, 1).uge(256)", "false", "true").c_str()) = ::testing
::Message()
;
266 EXPECT_TRUE(!APInt(8, 1).ugt(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!APInt(8, 1).ugt(256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 266, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!APInt(8, 1).ugt(256)", "false", "true").c_str()) = ::testing
::Message()
;
267 EXPECT_TRUE( APInt(8, 1).ule(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 1).ule(256))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 267, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 1).ule(256)", "false", "true").c_str()) = ::testing
::Message()
;
268 EXPECT_TRUE( APInt(8, 1).ult(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 1).ult(256))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 1).ult(256)", "false", "true").c_str()) = ::testing
::Message()
;
269 EXPECT_TRUE(!APInt(8, 1).sge(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!APInt(8, 1).sge(256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 269, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!APInt(8, 1).sge(256)", "false", "true").c_str()) = ::testing
::Message()
;
270 EXPECT_TRUE(!APInt(8, 1).sgt(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!APInt(8, 1).sgt(256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 270, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!APInt(8, 1).sgt(256)", "false", "true").c_str()) = ::testing
::Message()
;
271 EXPECT_TRUE( APInt(8, 1).sle(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 1).sle(256))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 1).sle(256)", "false", "true").c_str()) = ::testing
::Message()
;
272 EXPECT_TRUE( APInt(8, 1).slt(256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 1).slt(256))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 272, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 1).slt(256)", "false", "true").c_str()) = ::testing
::Message()
;
273 EXPECT_TRUE(!(APInt(8, 0) == 256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(APInt(8, 0) == 256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 273, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!(APInt(8, 0) == 256)", "false", "true").c_str()) = ::testing
::Message()
;
274 EXPECT_TRUE( APInt(8, 0) != 256)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 0) != 256)) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 0) != 256", "false", "true").c_str()) = ::testing
::Message()
;
275 EXPECT_TRUE(!(APInt(8, 1) == 256))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(APInt(8, 1) == 256)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 275, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!(APInt(8, 1) == 256)", "false", "true").c_str()) = ::testing
::Message()
;
276 EXPECT_TRUE( APInt(8, 1) != 256)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(APInt(8, 1) != 256)) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 276, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "APInt(8, 1) != 256", "false", "true").c_str()) = ::testing
::Message()
;
277
278 auto uint64max = UINT64_MAX(18446744073709551615UL);
279 auto int64max = INT64_MAX(9223372036854775807L);
280 auto int64min = INT64_MIN(-9223372036854775807L -1);
281
282 auto u64 = APInt{128, uint64max};
283 auto s64 = APInt{128, static_cast<uint64_t>(int64max), true};
284 auto big = u64 + 1;
285
286 EXPECT_TRUE( u64.uge(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.uge(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 286, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.uge(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
287 EXPECT_TRUE(!u64.ugt(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.ugt(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.ugt(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
288 EXPECT_TRUE( u64.ule(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.ule(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 288, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.ule(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
289 EXPECT_TRUE(!u64.ult(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.ult(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 289, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.ult(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
290 EXPECT_TRUE( u64.sge(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.sge(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 290, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.sge(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
291 EXPECT_TRUE( u64.sgt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.sgt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 291, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.sgt(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
292 EXPECT_TRUE(!u64.sle(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.sle(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 292, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.sle(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
293 EXPECT_TRUE(!u64.slt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.slt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 293, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.slt(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
294 EXPECT_TRUE( u64.sge(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.sge(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.sge(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
295 EXPECT_TRUE( u64.sgt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64.sgt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 295, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64.sgt(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
296 EXPECT_TRUE(!u64.sle(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.sle(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 296, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.sle(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
297 EXPECT_TRUE(!u64.slt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!u64.slt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 297, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!u64.slt(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
298
299 EXPECT_TRUE(u64 == uint64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64 == uint64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64 == uint64max", "false", "true").c_str()) = ::testing::
Message()
;
300 EXPECT_TRUE(u64 != int64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64 != int64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 300, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64 != int64max", "false", "true").c_str()) = ::testing::Message
()
;
301 EXPECT_TRUE(u64 != int64min)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(u64 != int64min)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 301, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "u64 != int64min", "false", "true").c_str()) = ::testing::Message
()
;
302
303 EXPECT_TRUE(!s64.uge(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.uge(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 303, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.uge(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
304 EXPECT_TRUE(!s64.ugt(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.ugt(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 304, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.ugt(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
305 EXPECT_TRUE( s64.ule(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.ule(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.ule(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
306 EXPECT_TRUE( s64.ult(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.ult(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 306, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.ult(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
307 EXPECT_TRUE( s64.sge(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.sge(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 307, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.sge(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
308 EXPECT_TRUE(!s64.sgt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.sgt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 308, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.sgt(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
309 EXPECT_TRUE( s64.sle(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.sle(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 309, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.sle(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
310 EXPECT_TRUE(!s64.slt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.slt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.slt(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
311 EXPECT_TRUE( s64.sge(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.sge(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 311, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.sge(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
312 EXPECT_TRUE( s64.sgt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64.sgt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 312, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64.sgt(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
313 EXPECT_TRUE(!s64.sle(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.sle(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 313, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.sle(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
314 EXPECT_TRUE(!s64.slt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!s64.slt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!s64.slt(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
315
316 EXPECT_TRUE(s64 != uint64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64 != uint64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 316, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64 != uint64max", "false", "true").c_str()) = ::testing::
Message()
;
317 EXPECT_TRUE(s64 == int64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64 == int64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64 == int64max", "false", "true").c_str()) = ::testing::Message
()
;
318 EXPECT_TRUE(s64 != int64min)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(s64 != int64min)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 318, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "s64 != int64min", "false", "true").c_str()) = ::testing::Message
()
;
319
320 EXPECT_TRUE( big.uge(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.uge(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 320, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.uge(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
321 EXPECT_TRUE( big.ugt(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.ugt(uint64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 321, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.ugt(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
322 EXPECT_TRUE(!big.ule(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.ule(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 322, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.ule(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
323 EXPECT_TRUE(!big.ult(uint64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.ult(uint64max)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 323, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.ult(uint64max)", "false", "true").c_str()) = ::testing
::Message()
;
324 EXPECT_TRUE( big.sge(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.sge(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 324, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.sge(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
325 EXPECT_TRUE( big.sgt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.sgt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.sgt(int64max)", "false", "true").c_str()) = ::testing::
Message()
;
326 EXPECT_TRUE(!big.sle(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.sle(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 326, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.sle(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
327 EXPECT_TRUE(!big.slt(int64max))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.slt(int64max))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 327, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.slt(int64max)", "false", "true").c_str()) = ::testing
::Message()
;
328 EXPECT_TRUE( big.sge(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.sge(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 328, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.sge(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
329 EXPECT_TRUE( big.sgt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big.sgt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big.sgt(int64min)", "false", "true").c_str()) = ::testing::
Message()
;
330 EXPECT_TRUE(!big.sle(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.sle(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 330, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.sle(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
331 EXPECT_TRUE(!big.slt(int64min))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!big.slt(int64min))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 331, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!big.slt(int64min)", "false", "true").c_str()) = ::testing
::Message()
;
332
333 EXPECT_TRUE(big != uint64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big != uint64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 333, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big != uint64max", "false", "true").c_str()) = ::testing::
Message()
;
334 EXPECT_TRUE(big != int64max)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big != int64max)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big != int64max", "false", "true").c_str()) = ::testing::Message
()
;
335 EXPECT_TRUE(big != int64min)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(big != int64min)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "big != int64min", "false", "true").c_str()) = ::testing::Message
()
;
336}
337
338TEST(APIntTest, compareWithInt64Min)class APIntTest_compareWithInt64Min_Test : public ::testing::
Test { public: APIntTest_compareWithInt64Min_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_compareWithInt64Min_Test
(APIntTest_compareWithInt64Min_Test const &); void operator
=(APIntTest_compareWithInt64Min_Test const &);};::testing
::TestInfo* const APIntTest_compareWithInt64Min_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"compareWithInt64Min", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_compareWithInt64Min_Test>);void APIntTest_compareWithInt64Min_Test
::TestBody()
{
339 int64_t edge = INT64_MIN(-9223372036854775807L -1);
340 int64_t edgeP1 = edge + 1;
341 int64_t edgeM1 = INT64_MAX(9223372036854775807L);
342 auto a = APInt{64, static_cast<uint64_t>(edge), true};
343
344 EXPECT_TRUE(!a.slt(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.slt(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 344, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.slt(edge)", "false", "true").c_str()) = ::testing::Message
()
;
345 EXPECT_TRUE( a.sle(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sle(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 345, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sle(edge)", "false", "true").c_str()) = ::testing::Message
()
;
346 EXPECT_TRUE(!a.sgt(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sgt(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 346, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sgt(edge)", "false", "true").c_str()) = ::testing::Message
()
;
347 EXPECT_TRUE( a.sge(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sge(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 347, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sge(edge)", "false", "true").c_str()) = ::testing::Message
()
;
348 EXPECT_TRUE( a.slt(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.slt(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 348, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.slt(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
349 EXPECT_TRUE( a.sle(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sle(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 349, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sle(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
350 EXPECT_TRUE(!a.sgt(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sgt(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 350, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sgt(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
351 EXPECT_TRUE(!a.sge(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sge(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 351, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sge(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
352 EXPECT_TRUE( a.slt(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.slt(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.slt(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
353 EXPECT_TRUE( a.sle(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sle(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 353, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sle(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
354 EXPECT_TRUE(!a.sgt(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sgt(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sgt(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
355 EXPECT_TRUE(!a.sge(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sge(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 355, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sge(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
356}
357
358TEST(APIntTest, compareWithHalfInt64Max)class APIntTest_compareWithHalfInt64Max_Test : public ::testing
::Test { public: APIntTest_compareWithHalfInt64Max_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_compareWithHalfInt64Max_Test
(APIntTest_compareWithHalfInt64Max_Test const &); void operator
=(APIntTest_compareWithHalfInt64Max_Test const &);};::testing
::TestInfo* const APIntTest_compareWithHalfInt64Max_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"compareWithHalfInt64Max", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_compareWithHalfInt64Max_Test>);void APIntTest_compareWithHalfInt64Max_Test
::TestBody()
{
359 uint64_t edge = 0x4000000000000000;
360 uint64_t edgeP1 = edge + 1;
361 uint64_t edgeM1 = edge - 1;
362 auto a = APInt{64, edge};
363
364 EXPECT_TRUE(!a.ult(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.ult(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 364, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.ult(edge)", "false", "true").c_str()) = ::testing::Message
()
;
365 EXPECT_TRUE( a.ule(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.ule(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 365, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.ule(edge)", "false", "true").c_str()) = ::testing::Message
()
;
366 EXPECT_TRUE(!a.ugt(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.ugt(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 366, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.ugt(edge)", "false", "true").c_str()) = ::testing::Message
()
;
367 EXPECT_TRUE( a.uge(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.uge(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 367, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.uge(edge)", "false", "true").c_str()) = ::testing::Message
()
;
368 EXPECT_TRUE( a.ult(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.ult(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 368, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.ult(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
369 EXPECT_TRUE( a.ule(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.ule(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.ule(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
370 EXPECT_TRUE(!a.ugt(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.ugt(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 370, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.ugt(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
371 EXPECT_TRUE(!a.uge(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.uge(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 371, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.uge(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
372 EXPECT_TRUE(!a.ult(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.ult(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 372, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.ult(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
373 EXPECT_TRUE(!a.ule(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.ule(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 373, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.ule(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
374 EXPECT_TRUE( a.ugt(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.ugt(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 374, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.ugt(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
375 EXPECT_TRUE( a.uge(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.uge(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 375, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.uge(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
376
377 EXPECT_TRUE(!a.slt(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.slt(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.slt(edge)", "false", "true").c_str()) = ::testing::Message
()
;
378 EXPECT_TRUE( a.sle(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sle(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 378, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sle(edge)", "false", "true").c_str()) = ::testing::Message
()
;
379 EXPECT_TRUE(!a.sgt(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sgt(edge))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sgt(edge)", "false", "true").c_str()) = ::testing::Message
()
;
380 EXPECT_TRUE( a.sge(edge))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sge(edge))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 380, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sge(edge)", "false", "true").c_str()) = ::testing::Message
()
;
381 EXPECT_TRUE( a.slt(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.slt(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 381, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.slt(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
382 EXPECT_TRUE( a.sle(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sle(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 382, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sle(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
383 EXPECT_TRUE(!a.sgt(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sgt(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 383, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sgt(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
384 EXPECT_TRUE(!a.sge(edgeP1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sge(edgeP1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 384, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sge(edgeP1)", "false", "true").c_str()) = ::testing::Message
()
;
385 EXPECT_TRUE(!a.slt(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.slt(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 385, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.slt(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
386 EXPECT_TRUE(!a.sle(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!a.sle(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 386, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "!a.sle(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
387 EXPECT_TRUE( a.sgt(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sgt(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 387, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sgt(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
388 EXPECT_TRUE( a.sge(edgeM1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.sge(edgeM1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 388, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.sge(edgeM1)", "false", "true").c_str()) = ::testing::Message
()
;
389}
390
391
392// Tests different div/rem varaints using scheme (a * b + c) / a
393void testDiv(APInt a, APInt b, APInt c) {
394 ASSERT_TRUE(a.uge(b))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.uge(b))) ; else return
::testing::internal::AssertHelper(::testing::TestPartResult::
kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.uge(b)", "false", "true").c_str()) = ::testing::Message(
)
; // Must: a >= b
395 ASSERT_TRUE(a.ugt(c))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(a.ugt(c))) ; else return
::testing::internal::AssertHelper(::testing::TestPartResult::
kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 395, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "a.ugt(c)", "false", "true").c_str()) = ::testing::Message(
)
; // Must: a > c
396
397 auto p = a * b + c;
398
399 auto q = p.udiv(a);
400 auto r = p.urem(a);
401 EXPECT_EQ(b, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(b)) == 1)>::Compare("b", "q"
, b, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 401, gtest_ar.failure_message()) = ::testing::Message()
;
402 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 402, gtest_ar.failure_message()) = ::testing::Message()
;
403 APInt::udivrem(p, a, q, r);
404 EXPECT_EQ(b, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(b)) == 1)>::Compare("b", "q"
, b, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 404, gtest_ar.failure_message()) = ::testing::Message()
;
405 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 405, gtest_ar.failure_message()) = ::testing::Message()
;
406 q = p.sdiv(a);
407 r = p.srem(a);
408 EXPECT_EQ(b, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(b)) == 1)>::Compare("b", "q"
, b, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 408, gtest_ar.failure_message()) = ::testing::Message()
;
409 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 409, gtest_ar.failure_message()) = ::testing::Message()
;
410 APInt::sdivrem(p, a, q, r);
411 EXPECT_EQ(b, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(b)) == 1)>::Compare("b", "q"
, b, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 411, gtest_ar.failure_message()) = ::testing::Message()
;
412 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 412, gtest_ar.failure_message()) = ::testing::Message()
;
413
414 if (b.ugt(c)) { // Test also symmetric case
415 q = p.udiv(b);
416 r = p.urem(b);
417 EXPECT_EQ(a, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(a)) == 1)>::Compare("a", "q"
, a, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 417, gtest_ar.failure_message()) = ::testing::Message()
;
418 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 418, gtest_ar.failure_message()) = ::testing::Message()
;
419 APInt::udivrem(p, b, q, r);
420 EXPECT_EQ(a, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(a)) == 1)>::Compare("a", "q"
, a, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 420, gtest_ar.failure_message()) = ::testing::Message()
;
421 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 421, gtest_ar.failure_message()) = ::testing::Message()
;
422 q = p.sdiv(b);
423 r = p.srem(b);
424 EXPECT_EQ(a, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(a)) == 1)>::Compare("a", "q"
, a, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 424, gtest_ar.failure_message()) = ::testing::Message()
;
425 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 425, gtest_ar.failure_message()) = ::testing::Message()
;
426 APInt::sdivrem(p, b, q, r);
427 EXPECT_EQ(a, q)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(a)) == 1)>::Compare("a", "q"
, a, q))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 427, gtest_ar.failure_message()) = ::testing::Message()
;
428 EXPECT_EQ(c, r)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(c)) == 1)>::Compare("c", "r"
, c, r))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 428, gtest_ar.failure_message()) = ::testing::Message()
;
429 }
430}
431
432TEST(APIntTest, divrem_big1)class APIntTest_divrem_big1_Test : public ::testing::Test { public
: APIntTest_divrem_big1_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big1_Test(APIntTest_divrem_big1_Test
const &); void operator=(APIntTest_divrem_big1_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big1_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big1", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big1_Test>);void APIntTest_divrem_big1_Test
::TestBody()
{
433 // Tests KnuthDiv rare step D6
434 testDiv({256, "1ffffffffffffffff", 16},
435 {256, "1ffffffffffffffff", 16},
436 {256, 0});
437}
438
439TEST(APIntTest, divrem_big2)class APIntTest_divrem_big2_Test : public ::testing::Test { public
: APIntTest_divrem_big2_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big2_Test(APIntTest_divrem_big2_Test
const &); void operator=(APIntTest_divrem_big2_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big2_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big2", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big2_Test>);void APIntTest_divrem_big2_Test
::TestBody()
{
440 // Tests KnuthDiv rare step D6
441 testDiv({1024, "112233ceff"
442 "cecece000000ffffffffffffffffffff"
443 "ffffffffffffffffffffffffffffffff"
444 "ffffffffffffffffffffffffffffffff"
445 "ffffffffffffffffffffffffffffff33", 16},
446 {1024, "111111ffffffffffffffff"
447 "ffffffffffffffffffffffffffffffff"
448 "fffffffffffffffffffffffffffffccf"
449 "ffffffffffffffffffffffffffffff00", 16},
450 {1024, 7919});
451}
452
453TEST(APIntTest, divrem_big3)class APIntTest_divrem_big3_Test : public ::testing::Test { public
: APIntTest_divrem_big3_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big3_Test(APIntTest_divrem_big3_Test
const &); void operator=(APIntTest_divrem_big3_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big3_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big3", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big3_Test>);void APIntTest_divrem_big3_Test
::TestBody()
{
454 // Tests KnuthDiv case without shift
455 testDiv({256, "80000001ffffffffffffffff", 16},
456 {256, "ffffffffffffff0000000", 16},
457 {256, 4219});
458}
459
460TEST(APIntTest, divrem_big4)class APIntTest_divrem_big4_Test : public ::testing::Test { public
: APIntTest_divrem_big4_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big4_Test(APIntTest_divrem_big4_Test
const &); void operator=(APIntTest_divrem_big4_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big4_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big4", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big4_Test>);void APIntTest_divrem_big4_Test
::TestBody()
{
461 // Tests heap allocation in divide() enfoced by huge numbers
462 testDiv(APInt{4096, 5}.shl(2001),
463 APInt{4096, 1}.shl(2000),
464 APInt{4096, 4219*13});
465}
466
467TEST(APIntTest, divrem_big5)class APIntTest_divrem_big5_Test : public ::testing::Test { public
: APIntTest_divrem_big5_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big5_Test(APIntTest_divrem_big5_Test
const &); void operator=(APIntTest_divrem_big5_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big5_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big5", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big5_Test>);void APIntTest_divrem_big5_Test
::TestBody()
{
468 // Tests one word divisor case of divide()
469 testDiv(APInt{1024, 19}.shl(811),
470 APInt{1024, 4356013}, // one word
471 APInt{1024, 1});
472}
473
474TEST(APIntTest, divrem_big6)class APIntTest_divrem_big6_Test : public ::testing::Test { public
: APIntTest_divrem_big6_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big6_Test(APIntTest_divrem_big6_Test
const &); void operator=(APIntTest_divrem_big6_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big6_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big6", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big6_Test>);void APIntTest_divrem_big6_Test
::TestBody()
{
475 // Tests some rare "borrow" cases in D4 step
476 testDiv(APInt{512, "ffffffffffffffff00000000000000000000000001", 16},
477 APInt{512, "10000000000000001000000000000001", 16},
478 APInt{512, "10000000000000000000000000000000", 16});
479}
480
481TEST(APIntTest, divrem_big7)class APIntTest_divrem_big7_Test : public ::testing::Test { public
: APIntTest_divrem_big7_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_divrem_big7_Test(APIntTest_divrem_big7_Test
const &); void operator=(APIntTest_divrem_big7_Test const
&);};::testing::TestInfo* const APIntTest_divrem_big7_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "divrem_big7", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_divrem_big7_Test>);void APIntTest_divrem_big7_Test
::TestBody()
{
482 // Yet another test for KnuthDiv rare step D6.
483 testDiv({224, "800000008000000200000005", 16},
484 {224, "fffffffd", 16},
485 {224, "80000000800000010000000f", 16});
486}
487
488TEST(APIntTest, fromString)class APIntTest_fromString_Test : public ::testing::Test { public
: APIntTest_fromString_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_fromString_Test(APIntTest_fromString_Test
const &); void operator=(APIntTest_fromString_Test const
&);};::testing::TestInfo* const APIntTest_fromString_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "fromString", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_fromString_Test>);void APIntTest_fromString_Test
::TestBody()
{
489 EXPECT_EQ(APInt(32, 0), APInt(32, "0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"0\", 2)", APInt(32, 0), APInt(32
, "0", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 489, gtest_ar.failure_message()) = ::testing::Message()
;
490 EXPECT_EQ(APInt(32, 1), APInt(32, "1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"1\", 2)", APInt(32, 1), APInt(32
, "1", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 490, gtest_ar.failure_message()) = ::testing::Message()
;
491 EXPECT_EQ(APInt(32, 2), APInt(32, "10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 2))) == 1)>::Compare
("APInt(32, 2)", "APInt(32, \"10\", 2)", APInt(32, 2), APInt(
32, "10", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 491, gtest_ar.failure_message()) = ::testing::Message()
;
492 EXPECT_EQ(APInt(32, 3), APInt(32, "11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3))) == 1)>::Compare
("APInt(32, 3)", "APInt(32, \"11\", 2)", APInt(32, 3), APInt(
32, "11", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 492, gtest_ar.failure_message()) = ::testing::Message()
;
493 EXPECT_EQ(APInt(32, 4), APInt(32, "100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 4))) == 1)>::Compare
("APInt(32, 4)", "APInt(32, \"100\", 2)", APInt(32, 4), APInt
(32, "100", 2)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 493, gtest_ar.failure_message()) = ::testing::Message()
;
494
495 EXPECT_EQ(APInt(32, 0), APInt(32, "+0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"+0\", 2)", APInt(32, 0), APInt(
32, "+0", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 495, gtest_ar.failure_message()) = ::testing::Message()
;
496 EXPECT_EQ(APInt(32, 1), APInt(32, "+1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"+1\", 2)", APInt(32, 1), APInt(
32, "+1", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 496, gtest_ar.failure_message()) = ::testing::Message()
;
497 EXPECT_EQ(APInt(32, 2), APInt(32, "+10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 2))) == 1)>::Compare
("APInt(32, 2)", "APInt(32, \"+10\", 2)", APInt(32, 2), APInt
(32, "+10", 2)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 497, gtest_ar.failure_message()) = ::testing::Message()
;
498 EXPECT_EQ(APInt(32, 3), APInt(32, "+11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3))) == 1)>::Compare
("APInt(32, 3)", "APInt(32, \"+11\", 2)", APInt(32, 3), APInt
(32, "+11", 2)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 498, gtest_ar.failure_message()) = ::testing::Message()
;
499 EXPECT_EQ(APInt(32, 4), APInt(32, "+100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 4))) == 1)>::Compare
("APInt(32, 4)", "APInt(32, \"+100\", 2)", APInt(32, 4), APInt
(32, "+100", 2)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 499, gtest_ar.failure_message()) = ::testing::Message()
;
500
501 EXPECT_EQ(APInt(32, uint64_t(-0LL)), APInt(32, "-0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-0LL)))) ==
1)>::Compare("APInt(32, uint64_t(-0LL))", "APInt(32, \"-0\", 2)"
, APInt(32, uint64_t(-0LL)), APInt(32, "-0", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 501, gtest_ar.failure_message()) = ::testing::Message()
;
502 EXPECT_EQ(APInt(32, uint64_t(-1LL)), APInt(32, "-1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-1LL)))) ==
1)>::Compare("APInt(32, uint64_t(-1LL))", "APInt(32, \"-1\", 2)"
, APInt(32, uint64_t(-1LL)), APInt(32, "-1", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 502, gtest_ar.failure_message()) = ::testing::Message()
;
503 EXPECT_EQ(APInt(32, uint64_t(-2LL)), APInt(32, "-10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-2LL)))) ==
1)>::Compare("APInt(32, uint64_t(-2LL))", "APInt(32, \"-10\", 2)"
, APInt(32, uint64_t(-2LL)), APInt(32, "-10", 2)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 503, gtest_ar.failure_message()) = ::testing::Message()
;
504 EXPECT_EQ(APInt(32, uint64_t(-3LL)), APInt(32, "-11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-3LL)))) ==
1)>::Compare("APInt(32, uint64_t(-3LL))", "APInt(32, \"-11\", 2)"
, APInt(32, uint64_t(-3LL)), APInt(32, "-11", 2)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 504, gtest_ar.failure_message()) = ::testing::Message()
;
505 EXPECT_EQ(APInt(32, uint64_t(-4LL)), APInt(32, "-100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-4LL)))) ==
1)>::Compare("APInt(32, uint64_t(-4LL))", "APInt(32, \"-100\", 2)"
, APInt(32, uint64_t(-4LL)), APInt(32, "-100", 2)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 505, gtest_ar.failure_message()) = ::testing::Message()
;
506
507
508 EXPECT_EQ(APInt(32, 0), APInt(32, "0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"0\", 8)", APInt(32, 0), APInt(32
, "0", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 508, gtest_ar.failure_message()) = ::testing::Message()
;
509 EXPECT_EQ(APInt(32, 1), APInt(32, "1", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"1\", 8)", APInt(32, 1), APInt(32
, "1", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 509, gtest_ar.failure_message()) = ::testing::Message()
;
510 EXPECT_EQ(APInt(32, 7), APInt(32, "7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 7))) == 1)>::Compare
("APInt(32, 7)", "APInt(32, \"7\", 8)", APInt(32, 7), APInt(32
, "7", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 510, gtest_ar.failure_message()) = ::testing::Message()
;
511 EXPECT_EQ(APInt(32, 8), APInt(32, "10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 8))) == 1)>::Compare
("APInt(32, 8)", "APInt(32, \"10\", 8)", APInt(32, 8), APInt(
32, "10", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 511, gtest_ar.failure_message()) = ::testing::Message()
;
512 EXPECT_EQ(APInt(32, 15), APInt(32, "17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 15))) == 1)>::Compare
("APInt(32, 15)", "APInt(32, \"17\", 8)", APInt(32, 15), APInt
(32, "17", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 512, gtest_ar.failure_message()) = ::testing::Message()
;
513 EXPECT_EQ(APInt(32, 16), APInt(32, "20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 16))) == 1)>::Compare
("APInt(32, 16)", "APInt(32, \"20\", 8)", APInt(32, 16), APInt
(32, "20", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 513, gtest_ar.failure_message()) = ::testing::Message()
;
514
515 EXPECT_EQ(APInt(32, +0), APInt(32, "+0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +0))) == 1)>::Compare
("APInt(32, +0)", "APInt(32, \"+0\", 8)", APInt(32, +0), APInt
(32, "+0", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 515, gtest_ar.failure_message()) = ::testing::Message()
;
516 EXPECT_EQ(APInt(32, +1), APInt(32, "+1", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +1))) == 1)>::Compare
("APInt(32, +1)", "APInt(32, \"+1\", 8)", APInt(32, +1), APInt
(32, "+1", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 516, gtest_ar.failure_message()) = ::testing::Message()
;
517 EXPECT_EQ(APInt(32, +7), APInt(32, "+7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +7))) == 1)>::Compare
("APInt(32, +7)", "APInt(32, \"+7\", 8)", APInt(32, +7), APInt
(32, "+7", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 517, gtest_ar.failure_message()) = ::testing::Message()
;
518 EXPECT_EQ(APInt(32, +8), APInt(32, "+10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +8))) == 1)>::Compare
("APInt(32, +8)", "APInt(32, \"+10\", 8)", APInt(32, +8), APInt
(32, "+10", 8)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 518, gtest_ar.failure_message()) = ::testing::Message()
;
519 EXPECT_EQ(APInt(32, +15), APInt(32, "+17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +15))) == 1)>::Compare
("APInt(32, +15)", "APInt(32, \"+17\", 8)", APInt(32, +15), APInt
(32, "+17", 8)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 519, gtest_ar.failure_message()) = ::testing::Message()
;
520 EXPECT_EQ(APInt(32, +16), APInt(32, "+20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, +16))) == 1)>::Compare
("APInt(32, +16)", "APInt(32, \"+20\", 8)", APInt(32, +16), APInt
(32, "+20", 8)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 520, gtest_ar.failure_message()) = ::testing::Message()
;
521
522 EXPECT_EQ(APInt(32, uint64_t(-0LL)), APInt(32, "-0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-0LL)))) ==
1)>::Compare("APInt(32, uint64_t(-0LL))", "APInt(32, \"-0\", 8)"
, APInt(32, uint64_t(-0LL)), APInt(32, "-0", 8)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 522, gtest_ar.failure_message()) = ::testing::Message()
;
523 EXPECT_EQ(APInt(32, uint64_t(-1LL)), APInt(32, "-1", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-1LL)))) ==
1)>::Compare("APInt(32, uint64_t(-1LL))", "APInt(32, \"-1\", 8)"
, APInt(32, uint64_t(-1LL)), APInt(32, "-1", 8)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 523, gtest_ar.failure_message()) = ::testing::Message()
;
524 EXPECT_EQ(APInt(32, uint64_t(-7LL)), APInt(32, "-7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-7LL)))) ==
1)>::Compare("APInt(32, uint64_t(-7LL))", "APInt(32, \"-7\", 8)"
, APInt(32, uint64_t(-7LL)), APInt(32, "-7", 8)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 524, gtest_ar.failure_message()) = ::testing::Message()
;
525 EXPECT_EQ(APInt(32, uint64_t(-8LL)), APInt(32, "-10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-8LL)))) ==
1)>::Compare("APInt(32, uint64_t(-8LL))", "APInt(32, \"-10\", 8)"
, APInt(32, uint64_t(-8LL)), APInt(32, "-10", 8)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 525, gtest_ar.failure_message()) = ::testing::Message()
;
526 EXPECT_EQ(APInt(32, uint64_t(-15LL)), APInt(32, "-17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-15LL)))) ==
1)>::Compare("APInt(32, uint64_t(-15LL))", "APInt(32, \"-17\", 8)"
, APInt(32, uint64_t(-15LL)), APInt(32, "-17", 8)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 526, gtest_ar.failure_message()) = ::testing::Message()
;
527 EXPECT_EQ(APInt(32, uint64_t(-16LL)), APInt(32, "-20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-16LL)))) ==
1)>::Compare("APInt(32, uint64_t(-16LL))", "APInt(32, \"-20\", 8)"
, APInt(32, uint64_t(-16LL)), APInt(32, "-20", 8)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 527, gtest_ar.failure_message()) = ::testing::Message()
;
528
529
530 EXPECT_EQ(APInt(32, 0), APInt(32, "0", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"0\", 10)", APInt(32, 0), APInt(
32, "0", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 530, gtest_ar.failure_message()) = ::testing::Message()
;
531 EXPECT_EQ(APInt(32, 1), APInt(32, "1", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"1\", 10)", APInt(32, 1), APInt(
32, "1", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 531, gtest_ar.failure_message()) = ::testing::Message()
;
532 EXPECT_EQ(APInt(32, 9), APInt(32, "9", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 9))) == 1)>::Compare
("APInt(32, 9)", "APInt(32, \"9\", 10)", APInt(32, 9), APInt(
32, "9", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 532, gtest_ar.failure_message()) = ::testing::Message()
;
533 EXPECT_EQ(APInt(32, 10), APInt(32, "10", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 10))) == 1)>::Compare
("APInt(32, 10)", "APInt(32, \"10\", 10)", APInt(32, 10), APInt
(32, "10", 10)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 533, gtest_ar.failure_message()) = ::testing::Message()
;
534 EXPECT_EQ(APInt(32, 19), APInt(32, "19", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 19))) == 1)>::Compare
("APInt(32, 19)", "APInt(32, \"19\", 10)", APInt(32, 19), APInt
(32, "19", 10)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 534, gtest_ar.failure_message()) = ::testing::Message()
;
535 EXPECT_EQ(APInt(32, 20), APInt(32, "20", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 20))) == 1)>::Compare
("APInt(32, 20)", "APInt(32, \"20\", 10)", APInt(32, 20), APInt
(32, "20", 10)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 535, gtest_ar.failure_message()) = ::testing::Message()
;
536
537 EXPECT_EQ(APInt(32, uint64_t(-0LL)), APInt(32, "-0", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-0LL)))) ==
1)>::Compare("APInt(32, uint64_t(-0LL))", "APInt(32, \"-0\", 10)"
, APInt(32, uint64_t(-0LL)), APInt(32, "-0", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 537, gtest_ar.failure_message()) = ::testing::Message()
;
538 EXPECT_EQ(APInt(32, uint64_t(-1LL)), APInt(32, "-1", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-1LL)))) ==
1)>::Compare("APInt(32, uint64_t(-1LL))", "APInt(32, \"-1\", 10)"
, APInt(32, uint64_t(-1LL)), APInt(32, "-1", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 538, gtest_ar.failure_message()) = ::testing::Message()
;
539 EXPECT_EQ(APInt(32, uint64_t(-9LL)), APInt(32, "-9", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-9LL)))) ==
1)>::Compare("APInt(32, uint64_t(-9LL))", "APInt(32, \"-9\", 10)"
, APInt(32, uint64_t(-9LL)), APInt(32, "-9", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 539, gtest_ar.failure_message()) = ::testing::Message()
;
540 EXPECT_EQ(APInt(32, uint64_t(-10LL)), APInt(32, "-10", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-10LL)))) ==
1)>::Compare("APInt(32, uint64_t(-10LL))", "APInt(32, \"-10\", 10)"
, APInt(32, uint64_t(-10LL)), APInt(32, "-10", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 540, gtest_ar.failure_message()) = ::testing::Message()
;
541 EXPECT_EQ(APInt(32, uint64_t(-19LL)), APInt(32, "-19", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-19LL)))) ==
1)>::Compare("APInt(32, uint64_t(-19LL))", "APInt(32, \"-19\", 10)"
, APInt(32, uint64_t(-19LL)), APInt(32, "-19", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 541, gtest_ar.failure_message()) = ::testing::Message()
;
542 EXPECT_EQ(APInt(32, uint64_t(-20LL)), APInt(32, "-20", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-20LL)))) ==
1)>::Compare("APInt(32, uint64_t(-20LL))", "APInt(32, \"-20\", 10)"
, APInt(32, uint64_t(-20LL)), APInt(32, "-20", 10)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 542, gtest_ar.failure_message()) = ::testing::Message()
;
543
544
545 EXPECT_EQ(APInt(32, 0), APInt(32, "0", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"0\", 16)", APInt(32, 0), APInt(
32, "0", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 545, gtest_ar.failure_message()) = ::testing::Message()
;
546 EXPECT_EQ(APInt(32, 1), APInt(32, "1", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"1\", 16)", APInt(32, 1), APInt(
32, "1", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 546, gtest_ar.failure_message()) = ::testing::Message()
;
547 EXPECT_EQ(APInt(32, 15), APInt(32, "F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 15))) == 1)>::Compare
("APInt(32, 15)", "APInt(32, \"F\", 16)", APInt(32, 15), APInt
(32, "F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 547, gtest_ar.failure_message()) = ::testing::Message()
;
548 EXPECT_EQ(APInt(32, 16), APInt(32, "10", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 16))) == 1)>::Compare
("APInt(32, 16)", "APInt(32, \"10\", 16)", APInt(32, 16), APInt
(32, "10", 16)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 548, gtest_ar.failure_message()) = ::testing::Message()
;
549 EXPECT_EQ(APInt(32, 31), APInt(32, "1F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 31))) == 1)>::Compare
("APInt(32, 31)", "APInt(32, \"1F\", 16)", APInt(32, 31), APInt
(32, "1F", 16)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 549, gtest_ar.failure_message()) = ::testing::Message()
;
550 EXPECT_EQ(APInt(32, 32), APInt(32, "20", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 32))) == 1)>::Compare
("APInt(32, 32)", "APInt(32, \"20\", 16)", APInt(32, 32), APInt
(32, "20", 16)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 550, gtest_ar.failure_message()) = ::testing::Message()
;
551
552 EXPECT_EQ(APInt(32, uint64_t(-0LL)), APInt(32, "-0", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-0LL)))) ==
1)>::Compare("APInt(32, uint64_t(-0LL))", "APInt(32, \"-0\", 16)"
, APInt(32, uint64_t(-0LL)), APInt(32, "-0", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 552, gtest_ar.failure_message()) = ::testing::Message()
;
553 EXPECT_EQ(APInt(32, uint64_t(-1LL)), APInt(32, "-1", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-1LL)))) ==
1)>::Compare("APInt(32, uint64_t(-1LL))", "APInt(32, \"-1\", 16)"
, APInt(32, uint64_t(-1LL)), APInt(32, "-1", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 553, gtest_ar.failure_message()) = ::testing::Message()
;
554 EXPECT_EQ(APInt(32, uint64_t(-15LL)), APInt(32, "-F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-15LL)))) ==
1)>::Compare("APInt(32, uint64_t(-15LL))", "APInt(32, \"-F\", 16)"
, APInt(32, uint64_t(-15LL)), APInt(32, "-F", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 554, gtest_ar.failure_message()) = ::testing::Message()
;
555 EXPECT_EQ(APInt(32, uint64_t(-16LL)), APInt(32, "-10", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-16LL)))) ==
1)>::Compare("APInt(32, uint64_t(-16LL))", "APInt(32, \"-10\", 16)"
, APInt(32, uint64_t(-16LL)), APInt(32, "-10", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 555, gtest_ar.failure_message()) = ::testing::Message()
;
556 EXPECT_EQ(APInt(32, uint64_t(-31LL)), APInt(32, "-1F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-31LL)))) ==
1)>::Compare("APInt(32, uint64_t(-31LL))", "APInt(32, \"-1F\", 16)"
, APInt(32, uint64_t(-31LL)), APInt(32, "-1F", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 556, gtest_ar.failure_message()) = ::testing::Message()
;
557 EXPECT_EQ(APInt(32, uint64_t(-32LL)), APInt(32, "-20", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-32LL)))) ==
1)>::Compare("APInt(32, uint64_t(-32LL))", "APInt(32, \"-20\", 16)"
, APInt(32, uint64_t(-32LL)), APInt(32, "-20", 16)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 557, gtest_ar.failure_message()) = ::testing::Message()
;
558
559 EXPECT_EQ(APInt(32, 0), APInt(32, "0", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 0))) == 1)>::Compare
("APInt(32, 0)", "APInt(32, \"0\", 36)", APInt(32, 0), APInt(
32, "0", 36)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 559, gtest_ar.failure_message()) = ::testing::Message()
;
560 EXPECT_EQ(APInt(32, 1), APInt(32, "1", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 1))) == 1)>::Compare
("APInt(32, 1)", "APInt(32, \"1\", 36)", APInt(32, 1), APInt(
32, "1", 36)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 560, gtest_ar.failure_message()) = ::testing::Message()
;
561 EXPECT_EQ(APInt(32, 35), APInt(32, "Z", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 35))) == 1)>::Compare
("APInt(32, 35)", "APInt(32, \"Z\", 36)", APInt(32, 35), APInt
(32, "Z", 36)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 561, gtest_ar.failure_message()) = ::testing::Message()
;
562 EXPECT_EQ(APInt(32, 36), APInt(32, "10", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 36))) == 1)>::Compare
("APInt(32, 36)", "APInt(32, \"10\", 36)", APInt(32, 36), APInt
(32, "10", 36)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 562, gtest_ar.failure_message()) = ::testing::Message()
;
563 EXPECT_EQ(APInt(32, 71), APInt(32, "1Z", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 71))) == 1)>::Compare
("APInt(32, 71)", "APInt(32, \"1Z\", 36)", APInt(32, 71), APInt
(32, "1Z", 36)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 563, gtest_ar.failure_message()) = ::testing::Message()
;
564 EXPECT_EQ(APInt(32, 72), APInt(32, "20", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 72))) == 1)>::Compare
("APInt(32, 72)", "APInt(32, \"20\", 36)", APInt(32, 72), APInt
(32, "20", 36)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 564, gtest_ar.failure_message()) = ::testing::Message()
;
565
566 EXPECT_EQ(APInt(32, uint64_t(-0LL)), APInt(32, "-0", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-0LL)))) ==
1)>::Compare("APInt(32, uint64_t(-0LL))", "APInt(32, \"-0\", 36)"
, APInt(32, uint64_t(-0LL)), APInt(32, "-0", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 566, gtest_ar.failure_message()) = ::testing::Message()
;
567 EXPECT_EQ(APInt(32, uint64_t(-1LL)), APInt(32, "-1", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-1LL)))) ==
1)>::Compare("APInt(32, uint64_t(-1LL))", "APInt(32, \"-1\", 36)"
, APInt(32, uint64_t(-1LL)), APInt(32, "-1", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 567, gtest_ar.failure_message()) = ::testing::Message()
;
568 EXPECT_EQ(APInt(32, uint64_t(-35LL)), APInt(32, "-Z", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-35LL)))) ==
1)>::Compare("APInt(32, uint64_t(-35LL))", "APInt(32, \"-Z\", 36)"
, APInt(32, uint64_t(-35LL)), APInt(32, "-Z", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 568, gtest_ar.failure_message()) = ::testing::Message()
;
569 EXPECT_EQ(APInt(32, uint64_t(-36LL)), APInt(32, "-10", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-36LL)))) ==
1)>::Compare("APInt(32, uint64_t(-36LL))", "APInt(32, \"-10\", 36)"
, APInt(32, uint64_t(-36LL)), APInt(32, "-10", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 569, gtest_ar.failure_message()) = ::testing::Message()
;
570 EXPECT_EQ(APInt(32, uint64_t(-71LL)), APInt(32, "-1Z", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-71LL)))) ==
1)>::Compare("APInt(32, uint64_t(-71LL))", "APInt(32, \"-1Z\", 36)"
, APInt(32, uint64_t(-71LL)), APInt(32, "-1Z", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 570, gtest_ar.failure_message()) = ::testing::Message()
;
571 EXPECT_EQ(APInt(32, uint64_t(-72LL)), APInt(32, "-20", 36))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(-72LL)))) ==
1)>::Compare("APInt(32, uint64_t(-72LL))", "APInt(32, \"-20\", 36)"
, APInt(32, uint64_t(-72LL)), APInt(32, "-20", 36)))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 571, gtest_ar.failure_message()) = ::testing::Message()
;
572}
573
574TEST(APIntTest, FromArray)class APIntTest_FromArray_Test : public ::testing::Test { public
: APIntTest_FromArray_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_FromArray_Test(APIntTest_FromArray_Test
const &); void operator=(APIntTest_FromArray_Test const &
);};::testing::TestInfo* const APIntTest_FromArray_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"FromArray", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_FromArray_Test
>);void APIntTest_FromArray_Test::TestBody()
{
575 EXPECT_EQ(APInt(32, uint64_t(1)), APInt(32, ArrayRef<uint64_t>(1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, uint64_t(1)))) == 1
)>::Compare("APInt(32, uint64_t(1))", "APInt(32, ArrayRef<uint64_t>(1))"
, APInt(32, uint64_t(1)), APInt(32, ArrayRef<uint64_t>(
1))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 575, gtest_ar.failure_message()) = ::testing::Message()
;
576}
577
578TEST(APIntTest, StringBitsNeeded2)class APIntTest_StringBitsNeeded2_Test : public ::testing::Test
{ public: APIntTest_StringBitsNeeded2_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_StringBitsNeeded2_Test(APIntTest_StringBitsNeeded2_Test
const &); void operator=(APIntTest_StringBitsNeeded2_Test
const &);};::testing::TestInfo* const APIntTest_StringBitsNeeded2_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "StringBitsNeeded2", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< APIntTest_StringBitsNeeded2_Test>);void
APIntTest_StringBitsNeeded2_Test::TestBody()
{
579 EXPECT_EQ(1U, APInt::getBitsNeeded( "0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"0\", 2)", 1U, APInt::getBitsNeeded(
"0", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 579, gtest_ar.failure_message()) = ::testing::Message()
;
580 EXPECT_EQ(1U, APInt::getBitsNeeded( "1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"1\", 2)", 1U, APInt::getBitsNeeded(
"1", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 580, gtest_ar.failure_message()) = ::testing::Message()
;
581 EXPECT_EQ(2U, APInt::getBitsNeeded( "10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"10\", 2)", 2U, APInt::getBitsNeeded
( "10", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 581, gtest_ar.failure_message()) = ::testing::Message()
;
582 EXPECT_EQ(2U, APInt::getBitsNeeded( "11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"11\", 2)", 2U, APInt::getBitsNeeded
( "11", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 582, gtest_ar.failure_message()) = ::testing::Message()
;
583 EXPECT_EQ(3U, APInt::getBitsNeeded("100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded(\"100\", 2)", 3U, APInt::getBitsNeeded
("100", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 583, gtest_ar.failure_message()) = ::testing::Message()
;
584
585 EXPECT_EQ(1U, APInt::getBitsNeeded( "+0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"+0\", 2)", 1U, APInt::getBitsNeeded
( "+0", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 585, gtest_ar.failure_message()) = ::testing::Message()
;
586 EXPECT_EQ(1U, APInt::getBitsNeeded( "+1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"+1\", 2)", 1U, APInt::getBitsNeeded
( "+1", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 586, gtest_ar.failure_message()) = ::testing::Message()
;
587 EXPECT_EQ(2U, APInt::getBitsNeeded( "+10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"+10\", 2)", 2U, APInt::getBitsNeeded
( "+10", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 587, gtest_ar.failure_message()) = ::testing::Message()
;
588 EXPECT_EQ(2U, APInt::getBitsNeeded( "+11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"+11\", 2)", 2U, APInt::getBitsNeeded
( "+11", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 588, gtest_ar.failure_message()) = ::testing::Message()
;
589 EXPECT_EQ(3U, APInt::getBitsNeeded("+100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded(\"+100\", 2)", 3U, APInt::getBitsNeeded
("+100", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 589, gtest_ar.failure_message()) = ::testing::Message()
;
590
591 EXPECT_EQ(2U, APInt::getBitsNeeded( "-0", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"-0\", 2)", 2U, APInt::getBitsNeeded
( "-0", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 591, gtest_ar.failure_message()) = ::testing::Message()
;
592 EXPECT_EQ(2U, APInt::getBitsNeeded( "-1", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"-1\", 2)", 2U, APInt::getBitsNeeded
( "-1", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 592, gtest_ar.failure_message()) = ::testing::Message()
;
593 EXPECT_EQ(3U, APInt::getBitsNeeded( "-10", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"-10\", 2)", 3U, APInt::getBitsNeeded
( "-10", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 593, gtest_ar.failure_message()) = ::testing::Message()
;
594 EXPECT_EQ(3U, APInt::getBitsNeeded( "-11", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"-11\", 2)", 3U, APInt::getBitsNeeded
( "-11", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 594, gtest_ar.failure_message()) = ::testing::Message()
;
595 EXPECT_EQ(4U, APInt::getBitsNeeded("-100", 2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded(\"-100\", 2)", 4U, APInt::getBitsNeeded
("-100", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 595, gtest_ar.failure_message()) = ::testing::Message()
;
596}
597
598TEST(APIntTest, StringBitsNeeded8)class APIntTest_StringBitsNeeded8_Test : public ::testing::Test
{ public: APIntTest_StringBitsNeeded8_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_StringBitsNeeded8_Test(APIntTest_StringBitsNeeded8_Test
const &); void operator=(APIntTest_StringBitsNeeded8_Test
const &);};::testing::TestInfo* const APIntTest_StringBitsNeeded8_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "StringBitsNeeded8", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< APIntTest_StringBitsNeeded8_Test>);void
APIntTest_StringBitsNeeded8_Test::TestBody()
{
599 EXPECT_EQ(3U, APInt::getBitsNeeded( "0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"0\", 8)", 3U, APInt::getBitsNeeded(
"0", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 599, gtest_ar.failure_message()) = ::testing::Message()
;
600 EXPECT_EQ(3U, APInt::getBitsNeeded( "7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"7\", 8)", 3U, APInt::getBitsNeeded(
"7", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 600, gtest_ar.failure_message()) = ::testing::Message()
;
601 EXPECT_EQ(6U, APInt::getBitsNeeded("10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"10\", 8)", 6U, APInt::getBitsNeeded(
"10", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 601, gtest_ar.failure_message()) = ::testing::Message()
;
602 EXPECT_EQ(6U, APInt::getBitsNeeded("17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"17\", 8)", 6U, APInt::getBitsNeeded(
"17", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 602, gtest_ar.failure_message()) = ::testing::Message()
;
603 EXPECT_EQ(6U, APInt::getBitsNeeded("20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"20\", 8)", 6U, APInt::getBitsNeeded(
"20", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 603, gtest_ar.failure_message()) = ::testing::Message()
;
604
605 EXPECT_EQ(3U, APInt::getBitsNeeded( "+0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"+0\", 8)", 3U, APInt::getBitsNeeded
( "+0", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 605, gtest_ar.failure_message()) = ::testing::Message()
;
606 EXPECT_EQ(3U, APInt::getBitsNeeded( "+7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(3U)) == 1)>::Compare("3U",
"APInt::getBitsNeeded( \"+7\", 8)", 3U, APInt::getBitsNeeded
( "+7", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 606, gtest_ar.failure_message()) = ::testing::Message()
;
607 EXPECT_EQ(6U, APInt::getBitsNeeded("+10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"+10\", 8)", 6U, APInt::getBitsNeeded
("+10", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 607, gtest_ar.failure_message()) = ::testing::Message()
;
608 EXPECT_EQ(6U, APInt::getBitsNeeded("+17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"+17\", 8)", 6U, APInt::getBitsNeeded
("+17", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 608, gtest_ar.failure_message()) = ::testing::Message()
;
609 EXPECT_EQ(6U, APInt::getBitsNeeded("+20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"+20\", 8)", 6U, APInt::getBitsNeeded
("+20", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 609, gtest_ar.failure_message()) = ::testing::Message()
;
610
611 EXPECT_EQ(4U, APInt::getBitsNeeded( "-0", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"-0\", 8)", 4U, APInt::getBitsNeeded
( "-0", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 611, gtest_ar.failure_message()) = ::testing::Message()
;
612 EXPECT_EQ(4U, APInt::getBitsNeeded( "-7", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"-7\", 8)", 4U, APInt::getBitsNeeded
( "-7", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 612, gtest_ar.failure_message()) = ::testing::Message()
;
613 EXPECT_EQ(7U, APInt::getBitsNeeded("-10", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(7U)) == 1)>::Compare("7U",
"APInt::getBitsNeeded(\"-10\", 8)", 7U, APInt::getBitsNeeded
("-10", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 613, gtest_ar.failure_message()) = ::testing::Message()
;
614 EXPECT_EQ(7U, APInt::getBitsNeeded("-17", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(7U)) == 1)>::Compare("7U",
"APInt::getBitsNeeded(\"-17\", 8)", 7U, APInt::getBitsNeeded
("-17", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 614, gtest_ar.failure_message()) = ::testing::Message()
;
615 EXPECT_EQ(7U, APInt::getBitsNeeded("-20", 8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(7U)) == 1)>::Compare("7U",
"APInt::getBitsNeeded(\"-20\", 8)", 7U, APInt::getBitsNeeded
("-20", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 615, gtest_ar.failure_message()) = ::testing::Message()
;
616}
617
618TEST(APIntTest, StringBitsNeeded10)class APIntTest_StringBitsNeeded10_Test : public ::testing::Test
{ public: APIntTest_StringBitsNeeded10_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_StringBitsNeeded10_Test(
APIntTest_StringBitsNeeded10_Test const &); void operator
=(APIntTest_StringBitsNeeded10_Test const &);};::testing::
TestInfo* const APIntTest_StringBitsNeeded10_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"StringBitsNeeded10", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_StringBitsNeeded10_Test>);void APIntTest_StringBitsNeeded10_Test
::TestBody()
{
619 EXPECT_EQ(1U, APInt::getBitsNeeded( "0", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"0\", 10)", 1U, APInt::getBitsNeeded
( "0", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 619, gtest_ar.failure_message()) = ::testing::Message()
;
620 EXPECT_EQ(2U, APInt::getBitsNeeded( "3", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"3\", 10)", 2U, APInt::getBitsNeeded
( "3", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 620, gtest_ar.failure_message()) = ::testing::Message()
;
621 EXPECT_EQ(4U, APInt::getBitsNeeded( "9", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"9\", 10)", 4U, APInt::getBitsNeeded
( "9", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 621, gtest_ar.failure_message()) = ::testing::Message()
;
622 EXPECT_EQ(4U, APInt::getBitsNeeded("10", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded(\"10\", 10)", 4U, APInt::getBitsNeeded
("10", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 622, gtest_ar.failure_message()) = ::testing::Message()
;
623 EXPECT_EQ(5U, APInt::getBitsNeeded("19", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded(\"19\", 10)", 5U, APInt::getBitsNeeded
("19", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 623, gtest_ar.failure_message()) = ::testing::Message()
;
624 EXPECT_EQ(5U, APInt::getBitsNeeded("20", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded(\"20\", 10)", 5U, APInt::getBitsNeeded
("20", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 624, gtest_ar.failure_message()) = ::testing::Message()
;
625
626 EXPECT_EQ(1U, APInt::getBitsNeeded( "+0", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1U)) == 1)>::Compare("1U",
"APInt::getBitsNeeded( \"+0\", 10)", 1U, APInt::getBitsNeeded
( "+0", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 626, gtest_ar.failure_message()) = ::testing::Message()
;
627 EXPECT_EQ(4U, APInt::getBitsNeeded( "+9", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"+9\", 10)", 4U, APInt::getBitsNeeded
( "+9", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 627, gtest_ar.failure_message()) = ::testing::Message()
;
628 EXPECT_EQ(4U, APInt::getBitsNeeded("+10", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded(\"+10\", 10)", 4U, APInt::getBitsNeeded
("+10", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 628, gtest_ar.failure_message()) = ::testing::Message()
;
629 EXPECT_EQ(5U, APInt::getBitsNeeded("+19", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded(\"+19\", 10)", 5U, APInt::getBitsNeeded
("+19", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 629, gtest_ar.failure_message()) = ::testing::Message()
;
630 EXPECT_EQ(5U, APInt::getBitsNeeded("+20", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded(\"+20\", 10)", 5U, APInt::getBitsNeeded
("+20", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 630, gtest_ar.failure_message()) = ::testing::Message()
;
631
632 EXPECT_EQ(2U, APInt::getBitsNeeded( "-0", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2U)) == 1)>::Compare("2U",
"APInt::getBitsNeeded( \"-0\", 10)", 2U, APInt::getBitsNeeded
( "-0", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 632, gtest_ar.failure_message()) = ::testing::Message()
;
633 EXPECT_EQ(5U, APInt::getBitsNeeded( "-9", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded( \"-9\", 10)", 5U, APInt::getBitsNeeded
( "-9", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 633, gtest_ar.failure_message()) = ::testing::Message()
;
634 EXPECT_EQ(5U, APInt::getBitsNeeded("-10", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded(\"-10\", 10)", 5U, APInt::getBitsNeeded
("-10", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 634, gtest_ar.failure_message()) = ::testing::Message()
;
635 EXPECT_EQ(6U, APInt::getBitsNeeded("-19", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"-19\", 10)", 6U, APInt::getBitsNeeded
("-19", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 635, gtest_ar.failure_message()) = ::testing::Message()
;
636 EXPECT_EQ(6U, APInt::getBitsNeeded("-20", 10))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(6U)) == 1)>::Compare("6U",
"APInt::getBitsNeeded(\"-20\", 10)", 6U, APInt::getBitsNeeded
("-20", 10)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 636, gtest_ar.failure_message()) = ::testing::Message()
;
637}
638
639TEST(APIntTest, StringBitsNeeded16)class APIntTest_StringBitsNeeded16_Test : public ::testing::Test
{ public: APIntTest_StringBitsNeeded16_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_StringBitsNeeded16_Test(
APIntTest_StringBitsNeeded16_Test const &); void operator
=(APIntTest_StringBitsNeeded16_Test const &);};::testing::
TestInfo* const APIntTest_StringBitsNeeded16_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"StringBitsNeeded16", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_StringBitsNeeded16_Test>);void APIntTest_StringBitsNeeded16_Test
::TestBody()
{
640 EXPECT_EQ(4U, APInt::getBitsNeeded( "0", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"0\", 16)", 4U, APInt::getBitsNeeded
( "0", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 640, gtest_ar.failure_message()) = ::testing::Message()
;
641 EXPECT_EQ(4U, APInt::getBitsNeeded( "F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"F\", 16)", 4U, APInt::getBitsNeeded
( "F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 641, gtest_ar.failure_message()) = ::testing::Message()
;
642 EXPECT_EQ(8U, APInt::getBitsNeeded("10", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"10\", 16)", 8U, APInt::getBitsNeeded
("10", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 642, gtest_ar.failure_message()) = ::testing::Message()
;
643 EXPECT_EQ(8U, APInt::getBitsNeeded("1F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"1F\", 16)", 8U, APInt::getBitsNeeded
("1F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 643, gtest_ar.failure_message()) = ::testing::Message()
;
644 EXPECT_EQ(8U, APInt::getBitsNeeded("20", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"20\", 16)", 8U, APInt::getBitsNeeded
("20", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 644, gtest_ar.failure_message()) = ::testing::Message()
;
645
646 EXPECT_EQ(4U, APInt::getBitsNeeded( "+0", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"+0\", 16)", 4U, APInt::getBitsNeeded
( "+0", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 646, gtest_ar.failure_message()) = ::testing::Message()
;
647 EXPECT_EQ(4U, APInt::getBitsNeeded( "+F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4U)) == 1)>::Compare("4U",
"APInt::getBitsNeeded( \"+F\", 16)", 4U, APInt::getBitsNeeded
( "+F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 647, gtest_ar.failure_message()) = ::testing::Message()
;
648 EXPECT_EQ(8U, APInt::getBitsNeeded("+10", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"+10\", 16)", 8U, APInt::getBitsNeeded
("+10", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 648, gtest_ar.failure_message()) = ::testing::Message()
;
649 EXPECT_EQ(8U, APInt::getBitsNeeded("+1F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"+1F\", 16)", 8U, APInt::getBitsNeeded
("+1F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 649, gtest_ar.failure_message()) = ::testing::Message()
;
650 EXPECT_EQ(8U, APInt::getBitsNeeded("+20", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(8U)) == 1)>::Compare("8U",
"APInt::getBitsNeeded(\"+20\", 16)", 8U, APInt::getBitsNeeded
("+20", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 650, gtest_ar.failure_message()) = ::testing::Message()
;
651
652 EXPECT_EQ(5U, APInt::getBitsNeeded( "-0", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded( \"-0\", 16)", 5U, APInt::getBitsNeeded
( "-0", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 652, gtest_ar.failure_message()) = ::testing::Message()
;
653 EXPECT_EQ(5U, APInt::getBitsNeeded( "-F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(5U)) == 1)>::Compare("5U",
"APInt::getBitsNeeded( \"-F\", 16)", 5U, APInt::getBitsNeeded
( "-F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 653, gtest_ar.failure_message()) = ::testing::Message()
;
654 EXPECT_EQ(9U, APInt::getBitsNeeded("-10", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(9U)) == 1)>::Compare("9U",
"APInt::getBitsNeeded(\"-10\", 16)", 9U, APInt::getBitsNeeded
("-10", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 654, gtest_ar.failure_message()) = ::testing::Message()
;
655 EXPECT_EQ(9U, APInt::getBitsNeeded("-1F", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(9U)) == 1)>::Compare("9U",
"APInt::getBitsNeeded(\"-1F\", 16)", 9U, APInt::getBitsNeeded
("-1F", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 655, gtest_ar.failure_message()) = ::testing::Message()
;
656 EXPECT_EQ(9U, APInt::getBitsNeeded("-20", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(9U)) == 1)>::Compare("9U",
"APInt::getBitsNeeded(\"-20\", 16)", 9U, APInt::getBitsNeeded
("-20", 16)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 656, gtest_ar.failure_message()) = ::testing::Message()
;
657}
658
659TEST(APIntTest, toString)class APIntTest_toString_Test : public ::testing::Test { public
: APIntTest_toString_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_toString_Test(APIntTest_toString_Test const
&); void operator=(APIntTest_toString_Test const &);
};::testing::TestInfo* const APIntTest_toString_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"toString", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_toString_Test
>);void APIntTest_toString_Test::TestBody()
{
660 SmallString<16> S;
661 bool isSigned;
662
663 APInt(8, 0).toString(S, 2, true, true);
664 EXPECT_EQ(S.str().str(), "0b0")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0b0\"", S.str().str(), "0b0"))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 664, gtest_ar.failure_message()) = ::testing::Message()
;
665 S.clear();
666 APInt(8, 0).toString(S, 8, true, true);
667 EXPECT_EQ(S.str().str(), "00")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"00\"", S.str().str(), "00"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 667, gtest_ar.failure_message()) = ::testing::Message()
;
668 S.clear();
669 APInt(8, 0).toString(S, 10, true, true);
670 EXPECT_EQ(S.str().str(), "0")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0\"", S.str().str(), "0"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 670, gtest_ar.failure_message()) = ::testing::Message()
;
671 S.clear();
672 APInt(8, 0).toString(S, 16, true, true);
673 EXPECT_EQ(S.str().str(), "0x0")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0x0\"", S.str().str(), "0x0"))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 673, gtest_ar.failure_message()) = ::testing::Message()
;
674 S.clear();
675 APInt(8, 0).toString(S, 36, true, false);
676 EXPECT_EQ(S.str().str(), "0")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0\"", S.str().str(), "0"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 676, gtest_ar.failure_message()) = ::testing::Message()
;
677 S.clear();
678
679 isSigned = false;
680 APInt(8, 255, isSigned).toString(S, 2, isSigned, true);
681 EXPECT_EQ(S.str().str(), "0b11111111")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0b11111111\"", S.str().str(), "0b11111111"
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 681, gtest_ar.failure_message()) = ::testing::Message()
;
682 S.clear();
683 APInt(8, 255, isSigned).toString(S, 8, isSigned, true);
684 EXPECT_EQ(S.str().str(), "0377")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0377\"", S.str().str(), "0377"))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 684, gtest_ar.failure_message()) = ::testing::Message()
;
685 S.clear();
686 APInt(8, 255, isSigned).toString(S, 10, isSigned, true);
687 EXPECT_EQ(S.str().str(), "255")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"255\"", S.str().str(), "255"))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 687, gtest_ar.failure_message()) = ::testing::Message()
;
688 S.clear();
689 APInt(8, 255, isSigned).toString(S, 16, isSigned, true);
690 EXPECT_EQ(S.str().str(), "0xFF")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"0xFF\"", S.str().str(), "0xFF"))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 690, gtest_ar.failure_message()) = ::testing::Message()
;
691 S.clear();
692 APInt(8, 255, isSigned).toString(S, 36, isSigned, false);
693 EXPECT_EQ(S.str().str(), "73")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"73\"", S.str().str(), "73"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 693, gtest_ar.failure_message()) = ::testing::Message()
;
694 S.clear();
695
696 isSigned = true;
697 APInt(8, 255, isSigned).toString(S, 2, isSigned, true);
698 EXPECT_EQ(S.str().str(), "-0b1")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"-0b1\"", S.str().str(), "-0b1"))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 698, gtest_ar.failure_message()) = ::testing::Message()
;
699 S.clear();
700 APInt(8, 255, isSigned).toString(S, 8, isSigned, true);
701 EXPECT_EQ(S.str().str(), "-01")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"-01\"", S.str().str(), "-01"))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 701, gtest_ar.failure_message()) = ::testing::Message()
;
702 S.clear();
703 APInt(8, 255, isSigned).toString(S, 10, isSigned, true);
704 EXPECT_EQ(S.str().str(), "-1")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"-1\"", S.str().str(), "-1"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 704, gtest_ar.failure_message()) = ::testing::Message()
;
705 S.clear();
706 APInt(8, 255, isSigned).toString(S, 16, isSigned, true);
707 EXPECT_EQ(S.str().str(), "-0x1")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"-0x1\"", S.str().str(), "-0x1"))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 707, gtest_ar.failure_message()) = ::testing::Message()
;
708 S.clear();
709 APInt(8, 255, isSigned).toString(S, 36, isSigned, false);
710 EXPECT_EQ(S.str().str(), "-1")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(S.str().str())) == 1)>::Compare
("S.str().str()", "\"-1\"", S.str().str(), "-1"))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 710, gtest_ar.failure_message()) = ::testing::Message()
;
711 S.clear();
712}
713
714TEST(APIntTest, Log2)class APIntTest_Log2_Test : public ::testing::Test { public: APIntTest_Log2_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); APIntTest_Log2_Test
(APIntTest_Log2_Test const &); void operator=(APIntTest_Log2_Test
const &);};::testing::TestInfo* const APIntTest_Log2_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "Log2", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_Log2_Test
>);void APIntTest_Log2_Test::TestBody()
{
715 EXPECT_EQ(APInt(15, 7).logBase2(), 2U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 7).logBase2())) == 1
)>::Compare("APInt(15, 7).logBase2()", "2U", APInt(15, 7).
logBase2(), 2U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 715, gtest_ar.failure_message()) = ::testing::Message()
;
716 EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 7).ceilLogBase2()))
== 1)>::Compare("APInt(15, 7).ceilLogBase2()", "3U", APInt
(15, 7).ceilLogBase2(), 3U))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 716, gtest_ar.failure_message()) = ::testing::Message()
;
717 EXPECT_EQ(APInt(15, 7).exactLogBase2(), -1)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 7).exactLogBase2())
) == 1)>::Compare("APInt(15, 7).exactLogBase2()", "-1", APInt
(15, 7).exactLogBase2(), -1))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 717, gtest_ar.failure_message()) = ::testing::Message()
;
718 EXPECT_EQ(APInt(15, 8).logBase2(), 3U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 8).logBase2())) == 1
)>::Compare("APInt(15, 8).logBase2()", "3U", APInt(15, 8).
logBase2(), 3U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 718, gtest_ar.failure_message()) = ::testing::Message()
;
719 EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 8).ceilLogBase2()))
== 1)>::Compare("APInt(15, 8).ceilLogBase2()", "3U", APInt
(15, 8).ceilLogBase2(), 3U))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 719, gtest_ar.failure_message()) = ::testing::Message()
;
720 EXPECT_EQ(APInt(15, 8).exactLogBase2(), 3)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 8).exactLogBase2())
) == 1)>::Compare("APInt(15, 8).exactLogBase2()", "3", APInt
(15, 8).exactLogBase2(), 3))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 720, gtest_ar.failure_message()) = ::testing::Message()
;
721 EXPECT_EQ(APInt(15, 9).logBase2(), 3U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 9).logBase2())) == 1
)>::Compare("APInt(15, 9).logBase2()", "3U", APInt(15, 9).
logBase2(), 3U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 721, gtest_ar.failure_message()) = ::testing::Message()
;
722 EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 9).ceilLogBase2()))
== 1)>::Compare("APInt(15, 9).ceilLogBase2()", "4U", APInt
(15, 9).ceilLogBase2(), 4U))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 722, gtest_ar.failure_message()) = ::testing::Message()
;
723 EXPECT_EQ(APInt(15, 9).exactLogBase2(), -1)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 9).exactLogBase2())
) == 1)>::Compare("APInt(15, 9).exactLogBase2()", "-1", APInt
(15, 9).exactLogBase2(), -1))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 723, gtest_ar.failure_message()) = ::testing::Message()
;
724}
725
726TEST(APIntTest, magic)class APIntTest_magic_Test : public ::testing::Test { public:
APIntTest_magic_Test() {} private: virtual void TestBody(); static
::testing::TestInfo* const test_info_ __attribute__ ((unused
)); APIntTest_magic_Test(APIntTest_magic_Test const &); void
operator=(APIntTest_magic_Test const &);};::testing::TestInfo
* const APIntTest_magic_Test ::test_info_ = ::testing::internal
::MakeAndRegisterTestInfo( "APIntTest", "magic", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< APIntTest_magic_Test>);void APIntTest_magic_Test
::TestBody()
{
727 EXPECT_EQ(APInt(32, 3).magic().m, APInt(32, "55555556", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3).magic().m)) == 1
)>::Compare("APInt(32, 3).magic().m", "APInt(32, \"55555556\", 16)"
, APInt(32, 3).magic().m, APInt(32, "55555556", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 727, gtest_ar.failure_message()) = ::testing::Message()
;
728 EXPECT_EQ(APInt(32, 3).magic().s, 0U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3).magic().s)) == 1
)>::Compare("APInt(32, 3).magic().s", "0U", APInt(32, 3).magic
().s, 0U))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 728, gtest_ar.failure_message()) = ::testing::Message()
;
729 EXPECT_EQ(APInt(32, 5).magic().m, APInt(32, "66666667", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 5).magic().m)) == 1
)>::Compare("APInt(32, 5).magic().m", "APInt(32, \"66666667\", 16)"
, APInt(32, 5).magic().m, APInt(32, "66666667", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 729, gtest_ar.failure_message()) = ::testing::Message()
;
730 EXPECT_EQ(APInt(32, 5).magic().s, 1U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 5).magic().s)) == 1
)>::Compare("APInt(32, 5).magic().s", "1U", APInt(32, 5).magic
().s, 1U))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 730, gtest_ar.failure_message()) = ::testing::Message()
;
731 EXPECT_EQ(APInt(32, 7).magic().m, APInt(32, "92492493", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 7).magic().m)) == 1
)>::Compare("APInt(32, 7).magic().m", "APInt(32, \"92492493\", 16)"
, APInt(32, 7).magic().m, APInt(32, "92492493", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 731, gtest_ar.failure_message()) = ::testing::Message()
;
732 EXPECT_EQ(APInt(32, 7).magic().s, 2U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 7).magic().s)) == 1
)>::Compare("APInt(32, 7).magic().s", "2U", APInt(32, 7).magic
().s, 2U))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 732, gtest_ar.failure_message()) = ::testing::Message()
;
733}
734
735TEST(APIntTest, magicu)class APIntTest_magicu_Test : public ::testing::Test { public
: APIntTest_magicu_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); APIntTest_magicu_Test(APIntTest_magicu_Test const &
); void operator=(APIntTest_magicu_Test const &);};::testing
::TestInfo* const APIntTest_magicu_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "APIntTest", "magicu", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< APIntTest_magicu_Test>
);void APIntTest_magicu_Test::TestBody()
{
736 EXPECT_EQ(APInt(32, 3).magicu().m, APInt(32, "AAAAAAAB", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3).magicu().m)) == 1
)>::Compare("APInt(32, 3).magicu().m", "APInt(32, \"AAAAAAAB\", 16)"
, APInt(32, 3).magicu().m, APInt(32, "AAAAAAAB", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 736, gtest_ar.failure_message()) = ::testing::Message()
;
737 EXPECT_EQ(APInt(32, 3).magicu().s, 1U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 3).magicu().s)) == 1
)>::Compare("APInt(32, 3).magicu().s", "1U", APInt(32, 3).
magicu().s, 1U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 737, gtest_ar.failure_message()) = ::testing::Message()
;
738 EXPECT_EQ(APInt(32, 5).magicu().m, APInt(32, "CCCCCCCD", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 5).magicu().m)) == 1
)>::Compare("APInt(32, 5).magicu().m", "APInt(32, \"CCCCCCCD\", 16)"
, APInt(32, 5).magicu().m, APInt(32, "CCCCCCCD", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 738, gtest_ar.failure_message()) = ::testing::Message()
;
739 EXPECT_EQ(APInt(32, 5).magicu().s, 2U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 5).magicu().s)) == 1
)>::Compare("APInt(32, 5).magicu().s", "2U", APInt(32, 5).
magicu().s, 2U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 739, gtest_ar.failure_message()) = ::testing::Message()
;
740 EXPECT_EQ(APInt(32, 7).magicu().m, APInt(32, "24924925", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 7).magicu().m)) == 1
)>::Compare("APInt(32, 7).magicu().m", "APInt(32, \"24924925\", 16)"
, APInt(32, 7).magicu().m, APInt(32, "24924925", 16)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 740, gtest_ar.failure_message()) = ::testing::Message()
;
741 EXPECT_EQ(APInt(32, 7).magicu().s, 3U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(32, 7).magicu().s)) == 1
)>::Compare("APInt(32, 7).magicu().s", "3U", APInt(32, 7).
magicu().s, 3U))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 741, gtest_ar.failure_message()) = ::testing::Message()
;
742 EXPECT_EQ(APInt(64, 25).magicu(1).m, APInt(64, "A3D70A3D70A3D70B", 16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(64, 25).magicu(1).m)) ==
1)>::Compare("APInt(64, 25).magicu(1).m", "APInt(64, \"A3D70A3D70A3D70B\", 16)"
, APInt(64, 25).magicu(1).m, APInt(64, "A3D70A3D70A3D70B", 16
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 742, gtest_ar.failure_message()) = ::testing::Message()
;
743 EXPECT_EQ(APInt(64, 25).magicu(1).s, 4U)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(64, 25).magicu(1).s)) ==
1)>::Compare("APInt(64, 25).magicu(1).s", "4U", APInt(64,
25).magicu(1).s, 4U))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 743, gtest_ar.failure_message()) = ::testing::Message()
;
744}
745
746#ifdef GTEST_HAS_DEATH_TEST1
747#ifndef NDEBUG
748TEST(APIntTest, StringDeath)class APIntTest_StringDeath_Test : public ::testing::Test { public
: APIntTest_StringDeath_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_StringDeath_Test(APIntTest_StringDeath_Test
const &); void operator=(APIntTest_StringDeath_Test const
&);};::testing::TestInfo* const APIntTest_StringDeath_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "StringDeath", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_StringDeath_Test>);void APIntTest_StringDeath_Test
::TestBody()
{
749 EXPECT_DEATH(APInt(0, "", 0), "Bitwidth too small")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Bitwidth too small"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(0, \"\", 0)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 749, &gtest_dt)) { goto gtest_label_749; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_749; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(0, "", 0); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_749: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 749, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
750 EXPECT_DEATH(APInt(32, "", 0), "Invalid string length")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Invalid string length"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"\", 0)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 750, &gtest_dt)) { goto gtest_label_750; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_750; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "", 0); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_750: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 750, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
751 EXPECT_DEATH(APInt(32, "0", 0), "Radix should be 2, 8, 10, 16, or 36!")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Radix should be 2, 8, 10, 16, or 36!"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"0\", 0)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 751, &gtest_dt)) { goto gtest_label_751; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_751; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "0", 0); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_751: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 751, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
Within the expansion of the macro 'EXPECT_DEATH':
a
Function call argument is an uninitialized value
752 EXPECT_DEATH(APInt(32, "", 10), "Invalid string length")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Invalid string length"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"\", 10)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 752, &gtest_dt)) { goto gtest_label_752; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_752; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "", 10); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_752: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 752, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
753 EXPECT_DEATH(APInt(32, "-", 10), "String is only a sign, needs a value.")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("String is only a sign, needs a value."
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"-\", 10)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 753, &gtest_dt)) { goto gtest_label_753; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_753; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "-", 10); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_753: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 753, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
754 EXPECT_DEATH(APInt(1, "1234", 10), "Insufficient bit width")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Insufficient bit width"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(1, \"1234\", 10)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 754, &gtest_dt)) { goto gtest_label_754; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_754; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(1, "1234", 10); }; gtest_dt
->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE);
break; } } } } else gtest_label_754: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 754, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
755 EXPECT_DEATH(APInt(32, "\0", 10), "Invalid string length")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Invalid string length"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"\\0\", 10)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 755, &gtest_dt)) { goto gtest_label_755; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_755; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "\0", 10); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_755: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 755, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
756 EXPECT_DEATH(APInt(32, StringRef("1\02", 3), 10), "Invalid character in digit string")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Invalid character in digit string"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, StringRef(\"1\\02\", 3), 10)"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 756, &gtest_dt)) { goto gtest_label_756; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_756; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, StringRef("1\02", 3), 10
); }; gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE
); break; } } } } else gtest_label_756: ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 756, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
757 EXPECT_DEATH(APInt(32, "1L", 10), "Invalid character in digit string")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = ("Invalid character in digit string"
); ::testing::internal::DeathTest* gtest_dt; if (!::testing::
internal::DeathTest::Create("APInt(32, \"1L\", 10)", &gtest_regex
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 757, &gtest_dt)) { goto gtest_label_757; } if (gtest_dt
!= __null) { ::testing::internal::scoped_ptr< ::testing::
internal::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt
->AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_757; } break; case
::testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { APInt(32, "1L", 10); }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_757: ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 757, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
758}
759#endif
760#endif
761
762TEST(APIntTest, mul_clear)class APIntTest_mul_clear_Test : public ::testing::Test { public
: APIntTest_mul_clear_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_mul_clear_Test(APIntTest_mul_clear_Test
const &); void operator=(APIntTest_mul_clear_Test const &
);};::testing::TestInfo* const APIntTest_mul_clear_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"mul_clear", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_mul_clear_Test
>);void APIntTest_mul_clear_Test::TestBody()
{
763 APInt ValA(65, -1ULL);
764 APInt ValB(65, 4);
765 APInt ValC(65, 0);
766 ValC = ValA * ValB;
767 ValA *= ValB;
768 EXPECT_EQ(ValA.toString(10, false), ValC.toString(10, false))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(ValA.toString(10, false))) ==
1)>::Compare("ValA.toString(10, false)", "ValC.toString(10, false)"
, ValA.toString(10, false), ValC.toString(10, false)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 768, gtest_ar.failure_message()) = ::testing::Message()
;
769}
770
771TEST(APIntTest, Rotate)class APIntTest_Rotate_Test : public ::testing::Test { public
: APIntTest_Rotate_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); APIntTest_Rotate_Test(APIntTest_Rotate_Test const &
); void operator=(APIntTest_Rotate_Test const &);};::testing
::TestInfo* const APIntTest_Rotate_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "APIntTest", "Rotate", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< APIntTest_Rotate_Test>
);void APIntTest_Rotate_Test::TestBody()
{
772 EXPECT_EQ(APInt(8, 1), APInt(8, 1).rotl(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 1).rotl(0)", APInt(8, 1), APInt(8, 1
).rotl(0)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 772, gtest_ar.failure_message()) = ::testing::Message()
;
773 EXPECT_EQ(APInt(8, 2), APInt(8, 1).rotl(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 2))) == 1)>::Compare
("APInt(8, 2)", "APInt(8, 1).rotl(1)", APInt(8, 2), APInt(8, 1
).rotl(1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 773, gtest_ar.failure_message()) = ::testing::Message()
;
774 EXPECT_EQ(APInt(8, 4), APInt(8, 1).rotl(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 4))) == 1)>::Compare
("APInt(8, 4)", "APInt(8, 1).rotl(2)", APInt(8, 4), APInt(8, 1
).rotl(2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 774, gtest_ar.failure_message()) = ::testing::Message()
;
775 EXPECT_EQ(APInt(8, 16), APInt(8, 1).rotl(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 1).rotl(4)", APInt(8, 16), APInt(8
, 1).rotl(4)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 775, gtest_ar.failure_message()) = ::testing::Message()
;
776 EXPECT_EQ(APInt(8, 1), APInt(8, 1).rotl(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 1).rotl(8)", APInt(8, 1), APInt(8, 1
).rotl(8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 776, gtest_ar.failure_message()) = ::testing::Message()
;
777
778 EXPECT_EQ(APInt(8, 16), APInt(8, 16).rotl(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 16).rotl(0)", APInt(8, 16), APInt(
8, 16).rotl(0)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 778, gtest_ar.failure_message()) = ::testing::Message()
;
779 EXPECT_EQ(APInt(8, 32), APInt(8, 16).rotl(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 32))) == 1)>::Compare
("APInt(8, 32)", "APInt(8, 16).rotl(1)", APInt(8, 32), APInt(
8, 16).rotl(1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 779, gtest_ar.failure_message()) = ::testing::Message()
;
780 EXPECT_EQ(APInt(8, 64), APInt(8, 16).rotl(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 64))) == 1)>::Compare
("APInt(8, 64)", "APInt(8, 16).rotl(2)", APInt(8, 64), APInt(
8, 16).rotl(2)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 780, gtest_ar.failure_message()) = ::testing::Message()
;
781 EXPECT_EQ(APInt(8, 1), APInt(8, 16).rotl(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 16).rotl(4)", APInt(8, 1), APInt(8,
16).rotl(4)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 781, gtest_ar.failure_message()) = ::testing::Message()
;
782 EXPECT_EQ(APInt(8, 16), APInt(8, 16).rotl(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 16).rotl(8)", APInt(8, 16), APInt(
8, 16).rotl(8)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 782, gtest_ar.failure_message()) = ::testing::Message()
;
783
784 EXPECT_EQ(APInt(8, 16), APInt(8, 16).rotr(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 16).rotr(0)", APInt(8, 16), APInt(
8, 16).rotr(0)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 784, gtest_ar.failure_message()) = ::testing::Message()
;
785 EXPECT_EQ(APInt(8, 8), APInt(8, 16).rotr(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 8))) == 1)>::Compare
("APInt(8, 8)", "APInt(8, 16).rotr(1)", APInt(8, 8), APInt(8,
16).rotr(1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 785, gtest_ar.failure_message()) = ::testing::Message()
;
786 EXPECT_EQ(APInt(8, 4), APInt(8, 16).rotr(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 4))) == 1)>::Compare
("APInt(8, 4)", "APInt(8, 16).rotr(2)", APInt(8, 4), APInt(8,
16).rotr(2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 786, gtest_ar.failure_message()) = ::testing::Message()
;
787 EXPECT_EQ(APInt(8, 1), APInt(8, 16).rotr(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 16).rotr(4)", APInt(8, 1), APInt(8,
16).rotr(4)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 787, gtest_ar.failure_message()) = ::testing::Message()
;
788 EXPECT_EQ(APInt(8, 16), APInt(8, 16).rotr(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 16).rotr(8)", APInt(8, 16), APInt(
8, 16).rotr(8)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 788, gtest_ar.failure_message()) = ::testing::Message()
;
789
790 EXPECT_EQ(APInt(8, 1), APInt(8, 1).rotr(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 1).rotr(0)", APInt(8, 1), APInt(8, 1
).rotr(0)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 790, gtest_ar.failure_message()) = ::testing::Message()
;
791 EXPECT_EQ(APInt(8, 128), APInt(8, 1).rotr(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 128))) == 1)>::Compare
("APInt(8, 128)", "APInt(8, 1).rotr(1)", APInt(8, 128), APInt
(8, 1).rotr(1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 791, gtest_ar.failure_message()) = ::testing::Message()
;
792 EXPECT_EQ(APInt(8, 64), APInt(8, 1).rotr(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 64))) == 1)>::Compare
("APInt(8, 64)", "APInt(8, 1).rotr(2)", APInt(8, 64), APInt(8
, 1).rotr(2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 792, gtest_ar.failure_message()) = ::testing::Message()
;
793 EXPECT_EQ(APInt(8, 16), APInt(8, 1).rotr(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 16))) == 1)>::Compare
("APInt(8, 16)", "APInt(8, 1).rotr(4)", APInt(8, 16), APInt(8
, 1).rotr(4)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 793, gtest_ar.failure_message()) = ::testing::Message()
;
794 EXPECT_EQ(APInt(8, 1), APInt(8, 1).rotr(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(8, 1))) == 1)>::Compare
("APInt(8, 1)", "APInt(8, 1).rotr(8)", APInt(8, 1), APInt(8, 1
).rotr(8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 794, gtest_ar.failure_message()) = ::testing::Message()
;
795
796 APInt Big(256, "00004000800000000000000000003fff8000000000000000", 16);
797 APInt Rot(256, "3fff80000000000000000000000000000000000040008000", 16);
798 EXPECT_EQ(Rot, Big.rotr(144))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(Rot)) == 1)>::Compare("Rot"
, "Big.rotr(144)", Rot, Big.rotr(144)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 798, gtest_ar.failure_message()) = ::testing::Message()
;
799}
800
801TEST(APIntTest, Splat)class APIntTest_Splat_Test : public ::testing::Test { public:
APIntTest_Splat_Test() {} private: virtual void TestBody(); static
::testing::TestInfo* const test_info_ __attribute__ ((unused
)); APIntTest_Splat_Test(APIntTest_Splat_Test const &); void
operator=(APIntTest_Splat_Test const &);};::testing::TestInfo
* const APIntTest_Splat_Test ::test_info_ = ::testing::internal
::MakeAndRegisterTestInfo( "APIntTest", "Splat", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< APIntTest_Splat_Test>);void APIntTest_Splat_Test
::TestBody()
{
802 APInt ValA(8, 0x01);
803 EXPECT_EQ(ValA, APInt::getSplat(8, ValA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(ValA)) == 1)>::Compare("ValA"
, "APInt::getSplat(8, ValA)", ValA, APInt::getSplat(8, ValA))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 803, gtest_ar.failure_message()) = ::testing::Message()
;
804 EXPECT_EQ(APInt(64, 0x0101010101010101ULL), APInt::getSplat(64, ValA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(64, 0x0101010101010101ULL
))) == 1)>::Compare("APInt(64, 0x0101010101010101ULL)", "APInt::getSplat(64, ValA)"
, APInt(64, 0x0101010101010101ULL), APInt::getSplat(64, ValA)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 804, gtest_ar.failure_message()) = ::testing::Message()
;
805
806 APInt ValB(3, 5);
807 EXPECT_EQ(APInt(4, 0xD), APInt::getSplat(4, ValB))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(4, 0xD))) == 1)>::Compare
("APInt(4, 0xD)", "APInt::getSplat(4, ValB)", APInt(4, 0xD), APInt
::getSplat(4, ValB)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 807, gtest_ar.failure_message()) = ::testing::Message()
;
808 EXPECT_EQ(APInt(15, 0xDB6D), APInt::getSplat(15, ValB))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt(15, 0xDB6D))) == 1)>
::Compare("APInt(15, 0xDB6D)", "APInt::getSplat(15, ValB)", APInt
(15, 0xDB6D), APInt::getSplat(15, ValB)))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 808, gtest_ar.failure_message()) = ::testing::Message()
;
809}
810
811TEST(APIntTest, tcDecrement)class APIntTest_tcDecrement_Test : public ::testing::Test { public
: APIntTest_tcDecrement_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_tcDecrement_Test(APIntTest_tcDecrement_Test
const &); void operator=(APIntTest_tcDecrement_Test const
&);};::testing::TestInfo* const APIntTest_tcDecrement_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "tcDecrement", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_tcDecrement_Test>);void APIntTest_tcDecrement_Test
::TestBody()
{
812 // Test single word decrement.
813
814 // No out borrow.
815 {
816 integerPart singleWord = ~integerPart(0) << (integerPartWidth - 1);
817 integerPart carry = APInt::tcDecrement(&singleWord, 1);
818 EXPECT_EQ(carry, integerPart(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(0)", carry, integerPart(0)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 818, gtest_ar.failure_message()) = ::testing::Message()
;
819 EXPECT_EQ(singleWord, ~integerPart(0) >> 1)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(singleWord)) == 1)>::Compare
("singleWord", "~integerPart(0) >> 1", singleWord, ~integerPart
(0) >> 1))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 819, gtest_ar.failure_message()) = ::testing::Message()
;
820 }
821
822 // With out borrow.
823 {
824 integerPart singleWord = 0;
825 integerPart carry = APInt::tcDecrement(&singleWord, 1);
826 EXPECT_EQ(carry, integerPart(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(1)", carry, integerPart(1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 826, gtest_ar.failure_message()) = ::testing::Message()
;
827 EXPECT_EQ(singleWord, ~integerPart(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(singleWord)) == 1)>::Compare
("singleWord", "~integerPart(0)", singleWord, ~integerPart(0)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 827, gtest_ar.failure_message()) = ::testing::Message()
;
828 }
829
830 // Test multiword decrement.
831
832 // No across word borrow, no out borrow.
833 {
834 integerPart test[4] = {0x1, 0x1, 0x1, 0x1};
835 integerPart expected[4] = {0x0, 0x1, 0x1, 0x1};
836 APInt::tcDecrement(test, 4);
837 EXPECT_EQ(APInt::tcCompare(test, expected, 4), 0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt::tcCompare(test, expected
, 4))) == 1)>::Compare("APInt::tcCompare(test, expected, 4)"
, "0", APInt::tcCompare(test, expected, 4), 0))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 837, gtest_ar.failure_message()) = ::testing::Message()
;
838 }
839
840 // 1 across word borrow, no out borrow.
841 {
842 integerPart test[4] = {0x0, 0xF, 0x1, 0x1};
843 integerPart expected[4] = {~integerPart(0), 0xE, 0x1, 0x1};
844 integerPart carry = APInt::tcDecrement(test, 4);
845 EXPECT_EQ(carry, integerPart(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(0)", carry, integerPart(0)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 845, gtest_ar.failure_message()) = ::testing::Message()
;
846 EXPECT_EQ(APInt::tcCompare(test, expected, 4), 0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt::tcCompare(test, expected
, 4))) == 1)>::Compare("APInt::tcCompare(test, expected, 4)"
, "0", APInt::tcCompare(test, expected, 4), 0))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 846, gtest_ar.failure_message()) = ::testing::Message()
;
847 }
848
849 // 2 across word borrow, no out borrow.
850 {
851 integerPart test[4] = {0x0, 0x0, 0xC, 0x1};
852 integerPart expected[4] = {~integerPart(0), ~integerPart(0), 0xB, 0x1};
853 integerPart carry = APInt::tcDecrement(test, 4);
854 EXPECT_EQ(carry, integerPart(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(0)", carry, integerPart(0)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 854, gtest_ar.failure_message()) = ::testing::Message()
;
855 EXPECT_EQ(APInt::tcCompare(test, expected, 4), 0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt::tcCompare(test, expected
, 4))) == 1)>::Compare("APInt::tcCompare(test, expected, 4)"
, "0", APInt::tcCompare(test, expected, 4), 0))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 855, gtest_ar.failure_message()) = ::testing::Message()
;
856 }
857
858 // 3 across word borrow, no out borrow.
859 {
860 integerPart test[4] = {0x0, 0x0, 0x0, 0x1};
861 integerPart expected[4] = {~integerPart(0), ~integerPart(0), ~integerPart(0), 0x0};
862 integerPart carry = APInt::tcDecrement(test, 4);
863 EXPECT_EQ(carry, integerPart(0))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(0)", carry, integerPart(0)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 863, gtest_ar.failure_message()) = ::testing::Message()
;
864 EXPECT_EQ(APInt::tcCompare(test, expected, 4), 0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt::tcCompare(test, expected
, 4))) == 1)>::Compare("APInt::tcCompare(test, expected, 4)"
, "0", APInt::tcCompare(test, expected, 4), 0))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 864, gtest_ar.failure_message()) = ::testing::Message()
;
865 }
866
867 // 3 across word borrow, with out borrow.
868 {
869 integerPart test[4] = {0x0, 0x0, 0x0, 0x0};
870 integerPart expected[4] = {~integerPart(0), ~integerPart(0), ~integerPart(0), ~integerPart(0)};
871 integerPart carry = APInt::tcDecrement(test, 4);
872 EXPECT_EQ(carry, integerPart(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(carry)) == 1)>::Compare("carry"
, "integerPart(1)", carry, integerPart(1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 872, gtest_ar.failure_message()) = ::testing::Message()
;
873 EXPECT_EQ(APInt::tcCompare(test, expected, 4), 0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(APInt::tcCompare(test, expected
, 4))) == 1)>::Compare("APInt::tcCompare(test, expected, 4)"
, "0", APInt::tcCompare(test, expected, 4), 0))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 873, gtest_ar.failure_message()) = ::testing::Message()
;
874 }
875}
876
877TEST(APIntTest, arrayAccess)class APIntTest_arrayAccess_Test : public ::testing::Test { public
: APIntTest_arrayAccess_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_arrayAccess_Test(APIntTest_arrayAccess_Test
const &); void operator=(APIntTest_arrayAccess_Test const
&);};::testing::TestInfo* const APIntTest_arrayAccess_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "arrayAccess", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_arrayAccess_Test>);void APIntTest_arrayAccess_Test
::TestBody()
{
878 // Single word check.
879 uint64_t E1 = 0x2CA7F46BF6569915ULL;
880 APInt A1(64, E1);
881 for (unsigned i = 0, e = 64; i < e; ++i) {
882 EXPECT_EQ(bool(E1 & (1ULL << i)),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(bool(E1 & (1ULL << i
)))) == 1)>::Compare("bool(E1 & (1ULL << i))", "A1[i]"
, bool(E1 & (1ULL << i)), A1[i]))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 883, gtest_ar.failure_message()) = ::testing::Message()
883 A1[i])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(bool(E1 & (1ULL << i
)))) == 1)>::Compare("bool(E1 & (1ULL << i))", "A1[i]"
, bool(E1 & (1ULL << i)), A1[i]))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 883, gtest_ar.failure_message()) = ::testing::Message()
;
884 }
885
886 // Multiword check.
887 integerPart E2[4] = {
888 0xEB6EB136591CBA21ULL,
889 0x7B9358BD6A33F10AULL,
890 0x7E7FFA5EADD8846ULL,
891 0x305F341CA00B613DULL
892 };
893 APInt A2(integerPartWidth*4, E2);
894 for (unsigned i = 0; i < 4; ++i) {
895 for (unsigned j = 0; j < integerPartWidth; ++j) {
896 EXPECT_EQ(bool(E2[i] & (1ULL << j)),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(bool(E2[i] & (1ULL <<
j)))) == 1)>::Compare("bool(E2[i] & (1ULL << j))"
, "A2[i*integerPartWidth + j]", bool(E2[i] & (1ULL <<
j)), A2[i*integerPartWidth + j]))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 897, gtest_ar.failure_message()) = ::testing::Message()
897 A2[i*integerPartWidth + j])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(bool(E2[i] & (1ULL <<
j)))) == 1)>::Compare("bool(E2[i] & (1ULL << j))"
, "A2[i*integerPartWidth + j]", bool(E2[i] & (1ULL <<
j)), A2[i*integerPartWidth + j]))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 897, gtest_ar.failure_message()) = ::testing::Message()
;
898 }
899 }
900}
901
902TEST(APIntTest, LargeAPIntConstruction)class APIntTest_LargeAPIntConstruction_Test : public ::testing
::Test { public: APIntTest_LargeAPIntConstruction_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_LargeAPIntConstruction_Test
(APIntTest_LargeAPIntConstruction_Test const &); void operator
=(APIntTest_LargeAPIntConstruction_Test const &);};::testing
::TestInfo* const APIntTest_LargeAPIntConstruction_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"LargeAPIntConstruction", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_LargeAPIntConstruction_Test>);void APIntTest_LargeAPIntConstruction_Test
::TestBody()
{
903 // Check that we can properly construct very large APInt. It is very
904 // unlikely that people will ever do this, but it is a legal input,
905 // so we should not crash on it.
906 APInt A9(UINT32_MAX(4294967295U), 0);
907 EXPECT_FALSE(A9.getBoolValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(A9.getBoolValue()))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A9.getBoolValue()", "true", "false").c_str()) = ::testing::
Message()
;
908}
909
910TEST(APIntTest, nearestLogBase2)class APIntTest_nearestLogBase2_Test : public ::testing::Test
{ public: APIntTest_nearestLogBase2_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_nearestLogBase2_Test(APIntTest_nearestLogBase2_Test
const &); void operator=(APIntTest_nearestLogBase2_Test const
&);};::testing::TestInfo* const APIntTest_nearestLogBase2_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"APIntTest", "nearestLogBase2", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_nearestLogBase2_Test>);void APIntTest_nearestLogBase2_Test
::TestBody()
{
911 // Single word check.
912
913 // Test round up.
914 uint64_t I1 = 0x1800001;
915 APInt A1(64, I1);
916 EXPECT_EQ(A1.nearestLogBase2(), A1.ceilLogBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A1.nearestLogBase2())) == 1)>
::Compare("A1.nearestLogBase2()", "A1.ceilLogBase2()", A1.nearestLogBase2
(), A1.ceilLogBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 916, gtest_ar.failure_message()) = ::testing::Message()
;
917
918 // Test round down.
919 uint64_t I2 = 0x1000011;
920 APInt A2(64, I2);
921 EXPECT_EQ(A2.nearestLogBase2(), A2.logBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A2.nearestLogBase2())) == 1)>
::Compare("A2.nearestLogBase2()", "A2.logBase2()", A2.nearestLogBase2
(), A2.logBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 921, gtest_ar.failure_message()) = ::testing::Message()
;
922
923 // Test ties round up.
924 uint64_t I3 = 0x1800000;
925 APInt A3(64, I3);
926 EXPECT_EQ(A3.nearestLogBase2(), A3.ceilLogBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A3.nearestLogBase2())) == 1)>
::Compare("A3.nearestLogBase2()", "A3.ceilLogBase2()", A3.nearestLogBase2
(), A3.ceilLogBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 926, gtest_ar.failure_message()) = ::testing::Message()
;
927
928 // Multiple word check.
929
930 // Test round up.
931 integerPart I4[4] = {0x0, 0xF, 0x18, 0x0};
932 APInt A4(integerPartWidth*4, I4);
933 EXPECT_EQ(A4.nearestLogBase2(), A4.ceilLogBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A4.nearestLogBase2())) == 1)>
::Compare("A4.nearestLogBase2()", "A4.ceilLogBase2()", A4.nearestLogBase2
(), A4.ceilLogBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 933, gtest_ar.failure_message()) = ::testing::Message()
;
934
935 // Test round down.
936 integerPart I5[4] = {0x0, 0xF, 0x10, 0x0};
937 APInt A5(integerPartWidth*4, I5);
938 EXPECT_EQ(A5.nearestLogBase2(), A5.logBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A5.nearestLogBase2())) == 1)>
::Compare("A5.nearestLogBase2()", "A5.logBase2()", A5.nearestLogBase2
(), A5.logBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 938, gtest_ar.failure_message()) = ::testing::Message()
;
939
940 // Test ties round up.
941 uint64_t I6[4] = {0x0, 0x0, 0x0, 0x18};
942 APInt A6(integerPartWidth*4, I6);
943 EXPECT_EQ(A6.nearestLogBase2(), A6.ceilLogBase2())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A6.nearestLogBase2())) == 1)>
::Compare("A6.nearestLogBase2()", "A6.ceilLogBase2()", A6.nearestLogBase2
(), A6.ceilLogBase2()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 943, gtest_ar.failure_message()) = ::testing::Message()
;
944
945 // Test BitWidth == 1 special cases.
946 APInt A7(1, 1);
947 EXPECT_EQ(A7.nearestLogBase2(), 0ULL)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A7.nearestLogBase2())) == 1)>
::Compare("A7.nearestLogBase2()", "0ULL", A7.nearestLogBase2(
), 0ULL))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 947, gtest_ar.failure_message()) = ::testing::Message()
;
948 APInt A8(1, 0);
949 EXPECT_EQ(A8.nearestLogBase2(), UINT32_MAX)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A8.nearestLogBase2())) == 1)>
::Compare("A8.nearestLogBase2()", "(4294967295U)", A8.nearestLogBase2
(), (4294967295U)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 949, gtest_ar.failure_message()) = ::testing::Message()
;
950
951 // Test the zero case when we have a bit width large enough such
952 // that the bit width is larger than UINT32_MAX-1.
953 APInt A9(UINT32_MAX(4294967295U), 0);
954 EXPECT_EQ(A9.nearestLogBase2(), UINT32_MAX)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(A9.nearestLogBase2())) == 1)>
::Compare("A9.nearestLogBase2()", "(4294967295U)", A9.nearestLogBase2
(), (4294967295U)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 954, gtest_ar.failure_message()) = ::testing::Message()
;
955}
956
957TEST(APIntTest, IsSplat)class APIntTest_IsSplat_Test : public ::testing::Test { public
: APIntTest_IsSplat_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); APIntTest_IsSplat_Test(APIntTest_IsSplat_Test const
&); void operator=(APIntTest_IsSplat_Test const &);}
;::testing::TestInfo* const APIntTest_IsSplat_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"IsSplat", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< APIntTest_IsSplat_Test
>);void APIntTest_IsSplat_Test::TestBody()
{
958 APInt A(32, 0x01010101);
959 EXPECT_FALSE(A.isSplat(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(A.isSplat(1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 959, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(1)", "true", "false").c_str()) = ::testing::Message
()
;
960 EXPECT_FALSE(A.isSplat(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(A.isSplat(2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 960, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(2)", "true", "false").c_str()) = ::testing::Message
()
;
961 EXPECT_FALSE(A.isSplat(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(A.isSplat(4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(4)", "true", "false").c_str()) = ::testing::Message
()
;
962 EXPECT_TRUE(A.isSplat(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(A.isSplat(8))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 962, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(8)", "false", "true").c_str()) = ::testing::Message
()
;
963 EXPECT_TRUE(A.isSplat(16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(A.isSplat(16))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 963, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(16)", "false", "true").c_str()) = ::testing::Message
()
;
964 EXPECT_TRUE(A.isSplat(32))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(A.isSplat(32))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 964, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "A.isSplat(32)", "false", "true").c_str()) = ::testing::Message
()
;
965
966 APInt B(24, 0xAAAAAA);
967 EXPECT_FALSE(B.isSplat(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(B.isSplat(1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 967, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "B.isSplat(1)", "true", "false").c_str()) = ::testing::Message
()
;
968 EXPECT_TRUE(B.isSplat(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(B.isSplat(2))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 968, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "B.isSplat(2)", "false", "true").c_str()) = ::testing::Message
()
;
969 EXPECT_TRUE(B.isSplat(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(B.isSplat(4))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 969, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "B.isSplat(4)", "false", "true").c_str()) = ::testing::Message
()
;
970 EXPECT_TRUE(B.isSplat(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(B.isSplat(8))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "B.isSplat(8)", "false", "true").c_str()) = ::testing::Message
()
;
971 EXPECT_TRUE(B.isSplat(24))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(B.isSplat(24))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 971, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "B.isSplat(24)", "false", "true").c_str()) = ::testing::Message
()
;
972
973 APInt C(24, 0xABAAAB);
974 EXPECT_FALSE(C.isSplat(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(C.isSplat(1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 974, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "C.isSplat(1)", "true", "false").c_str()) = ::testing::Message
()
;
975 EXPECT_FALSE(C.isSplat(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(C.isSplat(2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 975, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "C.isSplat(2)", "true", "false").c_str()) = ::testing::Message
()
;
976 EXPECT_FALSE(C.isSplat(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(C.isSplat(4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "C.isSplat(4)", "true", "false").c_str()) = ::testing::Message
()
;
977 EXPECT_FALSE(C.isSplat(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(C.isSplat(8)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 977, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "C.isSplat(8)", "true", "false").c_str()) = ::testing::Message
()
;
978 EXPECT_TRUE(C.isSplat(24))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(C.isSplat(24))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 978, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "C.isSplat(24)", "false", "true").c_str()) = ::testing::Message
()
;
979
980 APInt D(32, 0xABBAABBA);
981 EXPECT_FALSE(D.isSplat(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(D.isSplat(1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 981, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(1)", "true", "false").c_str()) = ::testing::Message
()
;
982 EXPECT_FALSE(D.isSplat(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(D.isSplat(2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(2)", "true", "false").c_str()) = ::testing::Message
()
;
983 EXPECT_FALSE(D.isSplat(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(D.isSplat(4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 983, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(4)", "true", "false").c_str()) = ::testing::Message
()
;
984 EXPECT_FALSE(D.isSplat(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(D.isSplat(8)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(8)", "true", "false").c_str()) = ::testing::Message
()
;
985 EXPECT_TRUE(D.isSplat(16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(D.isSplat(16))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 985, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(16)", "false", "true").c_str()) = ::testing::Message
()
;
986 EXPECT_TRUE(D.isSplat(32))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(D.isSplat(32))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 986, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "D.isSplat(32)", "false", "true").c_str()) = ::testing::Message
()
;
987
988 APInt E(32, 0);
989 EXPECT_TRUE(E.isSplat(1))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(1))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 989, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(1)", "false", "true").c_str()) = ::testing::Message
()
;
990 EXPECT_TRUE(E.isSplat(2))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(2))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 990, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(2)", "false", "true").c_str()) = ::testing::Message
()
;
991 EXPECT_TRUE(E.isSplat(4))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(4))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 991, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(4)", "false", "true").c_str()) = ::testing::Message
()
;
992 EXPECT_TRUE(E.isSplat(8))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(8))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(8)", "false", "true").c_str()) = ::testing::Message
()
;
993 EXPECT_TRUE(E.isSplat(16))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(16))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 993, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(16)", "false", "true").c_str()) = ::testing::Message
()
;
994 EXPECT_TRUE(E.isSplat(32))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(E.isSplat(32))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 994, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "E.isSplat(32)", "false", "true").c_str()) = ::testing::Message
()
;
995}
996
997#if defined(__clang__1)
998// Disable the pragma warning from versions of Clang without -Wself-move
999#pragma clang diagnostic push
1000#pragma clang diagnostic ignored "-Wunknown-pragmas"
1001// Disable the warning that triggers on exactly what is being tested.
1002#pragma clang diagnostic push
1003#pragma clang diagnostic ignored "-Wself-move"
1004#endif
1005TEST(APIntTest, SelfMoveAssignment)class APIntTest_SelfMoveAssignment_Test : public ::testing::Test
{ public: APIntTest_SelfMoveAssignment_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); APIntTest_SelfMoveAssignment_Test(
APIntTest_SelfMoveAssignment_Test const &); void operator
=(APIntTest_SelfMoveAssignment_Test const &);};::testing::
TestInfo* const APIntTest_SelfMoveAssignment_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "APIntTest",
"SelfMoveAssignment", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< APIntTest_SelfMoveAssignment_Test>);void APIntTest_SelfMoveAssignment_Test
::TestBody()
{
1006 APInt X(32, 0xdeadbeef);
1007 X = std::move(X);
1008 EXPECT_EQ(32u, X.getBitWidth())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(32u)) == 1)>::Compare("32u"
, "X.getBitWidth()", 32u, X.getBitWidth()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1008, gtest_ar.failure_message()) = ::testing::Message()
;
1009 EXPECT_EQ(0xdeadbeefULL, X.getLimitedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0xdeadbeefULL)) == 1)>::Compare
("0xdeadbeefULL", "X.getLimitedValue()", 0xdeadbeefULL, X.getLimitedValue
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1009, gtest_ar.failure_message()) = ::testing::Message()
;
1010
1011 uint64_t Bits[] = {0xdeadbeefdeadbeefULL, 0xdeadbeefdeadbeefULL};
1012 APInt Y(128, Bits);
1013 Y = std::move(Y);
1014 EXPECT_EQ(128u, Y.getBitWidth())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(128u)) == 1)>::Compare("128u"
, "Y.getBitWidth()", 128u, Y.getBitWidth()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1014, gtest_ar.failure_message()) = ::testing::Message()
;
1015 EXPECT_EQ(~0ULL, Y.getLimitedValue())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(~0ULL)) == 1)>::Compare("~0ULL"
, "Y.getLimitedValue()", ~0ULL, Y.getLimitedValue()))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1015, gtest_ar.failure_message()) = ::testing::Message()
;
1016 const uint64_t *Raw = Y.getRawData();
1017 EXPECT_EQ(2u, Y.getNumWords())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2u)) == 1)>::Compare("2u",
"Y.getNumWords()", 2u, Y.getNumWords()))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1017, gtest_ar.failure_message()) = ::testing::Message()
;
1018 EXPECT_EQ(0xdeadbeefdeadbeefULL, Raw[0])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0xdeadbeefdeadbeefULL)) == 1)
>::Compare("0xdeadbeefdeadbeefULL", "Raw[0]", 0xdeadbeefdeadbeefULL
, Raw[0]))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1018, gtest_ar.failure_message()) = ::testing::Message()
;
1019 EXPECT_EQ(0xdeadbeefdeadbeefULL, Raw[1])switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0xdeadbeefdeadbeefULL)) == 1)
>::Compare("0xdeadbeefdeadbeefULL", "Raw[1]", 0xdeadbeefdeadbeefULL
, Raw[1]))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/unittests/ADT/APIntTest.cpp"
, 1019, gtest_ar.failure_message()) = ::testing::Message()
;
1020}
1021#if defined(__clang__1)
1022#pragma clang diagnostic pop
1023#pragma clang diagnostic pop
1024#endif
1025}