test/utilities: Fix LLP64-aware.
This commit is contained in:
@@ -92,17 +92,17 @@ int main()
|
||||
}
|
||||
{
|
||||
typedef std::aligned_storage<8>::type T1;
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(long) == 4 ? 4 : 8), "");
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(void*) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == 8, "");
|
||||
}
|
||||
{
|
||||
typedef std::aligned_storage<9>::type T1;
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(long) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == (sizeof(long) == 4 ? 12 : 16), "");
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(void*) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == (sizeof(void*) == 4 ? 12 : 16), "");
|
||||
}
|
||||
{
|
||||
typedef std::aligned_storage<15>::type T1;
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(long) == 4 ? 4 : 8), "");
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(void*) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == 16, "");
|
||||
}
|
||||
{
|
||||
@@ -117,7 +117,7 @@ int main()
|
||||
}
|
||||
{
|
||||
typedef std::aligned_storage<10>::type T1;
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(long) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == (sizeof(long) == 4 ? 12 : 16), "");
|
||||
static_assert(std::alignment_of<T1>::value == (sizeof(void*) == 4 ? 4 : 8), "");
|
||||
static_assert(sizeof(T1) == (sizeof(void*) == 4 ? 12 : 16), "");
|
||||
}
|
||||
}
|
||||
|
@@ -30,13 +30,13 @@ public:
|
||||
|
||||
int main()
|
||||
{
|
||||
test_alignment_of<int&, sizeof(long) == 4 ? 4 : 8>();
|
||||
test_alignment_of<int&, sizeof(void*) == 4 ? 4 : 8>();
|
||||
test_alignment_of<Class, 1>();
|
||||
test_alignment_of<int*, sizeof(long) == 4 ? 4 : 8>();
|
||||
test_alignment_of<const int*, sizeof(long) == 4 ? 4 : 8>();
|
||||
test_alignment_of<int*, sizeof(void*) == 4 ? 4 : 8>();
|
||||
test_alignment_of<const int*, sizeof(void*) == 4 ? 4 : 8>();
|
||||
test_alignment_of<char[3], 1>();
|
||||
test_alignment_of<int, 4>();
|
||||
test_alignment_of<double, sizeof(long) == 4 ? 4 : 8>();
|
||||
test_alignment_of<double, sizeof(void*) == 4 ? 4 : 8>();
|
||||
test_alignment_of<bool, 1>();
|
||||
test_alignment_of<unsigned, 4>();
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ void test_to_ulong()
|
||||
max};
|
||||
for (std::size_t i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i)
|
||||
{
|
||||
std::size_t j = tests[i];
|
||||
unsigned long j = tests[i];
|
||||
std::bitset<N> v(j);
|
||||
assert(j == v.to_ulong());
|
||||
}
|
||||
|
Reference in New Issue
Block a user