forked from OSchip/llvm-project
parent
837bba1c51
commit
10f8387b94
|
@ -30,7 +30,7 @@ int main()
|
|||
test<char, std::numeric_limits<char>::is_signed ? 7 : 8>();
|
||||
test<signed char, 7>();
|
||||
test<unsigned char, 8>();
|
||||
test<wchar_t, std::numeric_limits<wchar_t>::is_signed ? 31 : 32>();
|
||||
test<wchar_t, std::numeric_limits<wchar_t>::is_signed ? sizeof(wchar_t)*8-1 : sizeof(wchar_t)*8>();
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 16>();
|
||||
test<char32_t, 32>();
|
||||
|
|
|
@ -34,7 +34,7 @@ int main()
|
|||
test<char, 2>();
|
||||
test<signed char, 2>();
|
||||
test<unsigned char, 2>();
|
||||
test<wchar_t, 9>();
|
||||
test<wchar_t, 5*sizeof(wchar_t)/2-1>(); // 4 -> 9 and 2 -> 4
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 4>();
|
||||
test<char32_t, 9>();
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// alignment_of
|
||||
|
||||
#include <type_traits>
|
||||
#include <cstdint>
|
||||
|
||||
template <class T, unsigned A>
|
||||
void test_alignment_of()
|
||||
|
@ -32,8 +33,8 @@ int main()
|
|||
{
|
||||
test_alignment_of<int&, 4>();
|
||||
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(intptr_t)>();
|
||||
test_alignment_of<const int*, sizeof(intptr_t)>();
|
||||
test_alignment_of<char[3], 1>();
|
||||
test_alignment_of<int, 4>();
|
||||
test_alignment_of<double, 8>();
|
||||
|
|
Loading…
Reference in New Issue