A few fixes to tests for Windows port.

llvm-svn: 186334
This commit is contained in:
Howard Hinnant 2013-07-15 18:09:11 +00:00
parent 837bba1c51
commit 10f8387b94
3 changed files with 5 additions and 4 deletions

View File

@ -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>();

View File

@ -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>();

View File

@ -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>();