[libcxx] r186334 - A few fixes to tests for Windows port.
Howard Hinnant
hhinnant at apple.com
Mon Jul 15 11:09:11 PDT 2013
Author: hhinnant
Date: Mon Jul 15 13:09:11 2013
New Revision: 186334
URL: http://llvm.org/viewvc/llvm-project?rev=186334&view=rev
Log:
A few fixes to tests for Windows port.
Modified:
libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
libcxx/trunk/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp
Modified: libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp?rev=186334&r1=186333&r2=186334&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp Mon Jul 15 13:09:11 2013
@@ -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>();
Modified: libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp?rev=186334&r1=186333&r2=186334&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp Mon Jul 15 13:09:11 2013
@@ -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>();
Modified: libcxx/trunk/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp?rev=186334&r1=186333&r2=186334&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp Mon Jul 15 13:09:11 2013
@@ -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>();
More information about the cfe-commits
mailing list