[libcxx] r186136 - Port make_[un]signed tests to platforms where sizeof(wchar_t) == 2.
Howard Hinnant
hhinnant at apple.com
Thu Jul 11 16:51:05 PDT 2013
Author: hhinnant
Date: Thu Jul 11 18:51:05 2013
New Revision: 186136
URL: http://llvm.org/viewvc/llvm-project?rev=186136&view=rev
Log:
Port make_[un]signed tests to platforms where sizeof(wchar_t) == 2.
Modified:
libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
Modified: libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp?rev=186136&r1=186135&r2=186136&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp Thu Jul 11 18:51:05 2013
@@ -43,8 +43,8 @@ int main()
test_make_signed< unsigned long, long >();
test_make_signed< long long, signed long long >();
test_make_signed< unsigned long long, signed long long >();
- test_make_signed< wchar_t, int >();
- test_make_signed< const wchar_t, const int >();
+ test_make_signed< wchar_t, std::conditional<sizeof(wchar_t) == 4, int, short>::type >();
+ test_make_signed< const wchar_t, std::conditional<sizeof(wchar_t) == 4, const int, const short>::type >();
test_make_signed< const Enum, const int >();
test_make_signed< BigEnum, std::conditional<sizeof(long) == 4, long long, long>::type >();
}
Modified: libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp?rev=186136&r1=186135&r2=186136&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp Thu Jul 11 18:51:05 2013
@@ -43,8 +43,8 @@ int main()
test_make_unsigned<unsigned long, unsigned long> ();
test_make_unsigned<long long, unsigned long long> ();
test_make_unsigned<unsigned long long, unsigned long long> ();
- test_make_unsigned<wchar_t, unsigned int> ();
- test_make_unsigned<const wchar_t, const unsigned int> ();
+ test_make_unsigned<wchar_t, std::conditional<sizeof(wchar_t) == 4, unsigned int, unsigned short>::type> ();
+ test_make_unsigned<const wchar_t, std::conditional<sizeof(wchar_t) == 4, const unsigned int, const unsigned short>::type> ();
test_make_unsigned<const Enum, const unsigned int> ();
test_make_unsigned<BigEnum,
std::conditional<sizeof(long) == 4, unsigned long long, unsigned long>::type> ();
More information about the cfe-commits
mailing list