[cfe-commits] [libcxx] r135247 - in /libcxx/trunk/test: depr/depr.c.headers/wchar_h.pass.cpp strings/c.strings/cwchar.pass.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Thu Jul 14 22:44:48 PDT 2011


Author: coppro
Date: Fri Jul 15 00:44:47 2011
New Revision: 135247

URL: http://llvm.org/viewvc/llvm-project?rev=135247&view=rev
Log:
Fix wchar tests by not assuming that tm is complete and by using the
proper va_list time on non-darwin platforms.

Modified:
    libcxx/trunk/test/depr/depr.c.headers/wchar_h.pass.cpp
    libcxx/trunk/test/strings/c.strings/cwchar.pass.cpp

Modified: libcxx/trunk/test/depr/depr.c.headers/wchar_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.c.headers/wchar_h.pass.cpp?rev=135247&r1=135246&r2=135247&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.c.headers/wchar_h.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.c.headers/wchar_h.pass.cpp Fri Jul 15 00:44:47 2011
@@ -32,10 +32,14 @@
 {
     mbstate_t mb = {0};
     size_t s = 0;
-    tm tm = {0};
+    tm *tm = 0;
     wint_t w = 0;
     ::FILE* fp = 0;
+#ifdef __APPLE__
     __darwin_va_list va;
+#else
+    __builtin_va_list va;
+#endif
     char* ns = 0;
     wchar_t* ws = 0;
     static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), "");
@@ -88,7 +92,7 @@
     static_assert((std::is_same<decltype(wmemcpy(ws, L"", s)), wchar_t*>::value), "");
     static_assert((std::is_same<decltype(wmemmove(ws, L"", s)), wchar_t*>::value), "");
     static_assert((std::is_same<decltype(wmemset(ws, L' ', s)), wchar_t*>::value), "");
-    static_assert((std::is_same<decltype(wcsftime(ws, s, L"", &tm)), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcsftime(ws, s, L"", tm)), size_t>::value), "");
     static_assert((std::is_same<decltype(btowc(0)), wint_t>::value), "");
     static_assert((std::is_same<decltype(wctob(w)), int>::value), "");
     static_assert((std::is_same<decltype(mbsinit(&mb)), int>::value), "");

Modified: libcxx/trunk/test/strings/c.strings/cwchar.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/strings/c.strings/cwchar.pass.cpp?rev=135247&r1=135246&r2=135247&view=diff
==============================================================================
--- libcxx/trunk/test/strings/c.strings/cwchar.pass.cpp (original)
+++ libcxx/trunk/test/strings/c.strings/cwchar.pass.cpp Fri Jul 15 00:44:47 2011
@@ -32,10 +32,14 @@
 {
     std::mbstate_t mb = {0};
     std::size_t s = 0;
-    std::tm tm = {0};
+    std::tm *tm = 0;
     std::wint_t w = 0;
     ::FILE* fp = 0;
+#ifdef __APPLE__
     __darwin_va_list va;
+#else
+    __builtin_va_list va;
+#endif
     char* ns = 0;
     wchar_t* ws = 0;
     static_assert((std::is_same<decltype(std::fwprintf(fp, L"")), int>::value), "");
@@ -93,7 +97,7 @@
     static_assert((std::is_same<decltype(std::wmemcpy(ws, L"", s)), wchar_t*>::value), "");
     static_assert((std::is_same<decltype(std::wmemmove(ws, L"", s)), wchar_t*>::value), "");
     static_assert((std::is_same<decltype(std::wmemset(ws, L' ', s)), wchar_t*>::value), "");
-    static_assert((std::is_same<decltype(std::wcsftime(ws, s, L"", &tm)), std::size_t>::value), "");
+    static_assert((std::is_same<decltype(std::wcsftime(ws, s, L"", tm)), std::size_t>::value), "");
     static_assert((std::is_same<decltype(std::btowc(0)), wint_t>::value), "");
     static_assert((std::is_same<decltype(std::wctob(w)), int>::value), "");
     static_assert((std::is_same<decltype(std::mbsinit(&mb)), int>::value), "");





More information about the cfe-commits mailing list