diff options
author | Alexis Hunt <alercah@gmail.com> | 2011-07-15 05:44:47 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2011-07-15 05:44:47 +0000 |
commit | bbe2b9dbc4e015714c3abfcf1939d1bc992ad08a (patch) | |
tree | 6ecb8c823cb5ad25e868d273386aebbdc61da345 /libcxx | |
parent | 4084c9ebe5f9a81ba235da144d5e3f5f2117dcf2 (diff) | |
download | bcm5719-llvm-bbe2b9dbc4e015714c3abfcf1939d1bc992ad08a.tar.gz bcm5719-llvm-bbe2b9dbc4e015714c3abfcf1939d1bc992ad08a.zip |
Fix wchar tests by not assuming that tm is complete and by using the
proper va_list time on non-darwin platforms.
llvm-svn: 135247
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/test/depr/depr.c.headers/wchar_h.pass.cpp | 8 | ||||
-rw-r--r-- | libcxx/test/strings/c.strings/cwchar.pass.cpp | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libcxx/test/depr/depr.c.headers/wchar_h.pass.cpp b/libcxx/test/depr/depr.c.headers/wchar_h.pass.cpp index f861827861e..68bea49cfe0 100644 --- a/libcxx/test/depr/depr.c.headers/wchar_h.pass.cpp +++ b/libcxx/test/depr/depr.c.headers/wchar_h.pass.cpp @@ -32,10 +32,14 @@ int main() { 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 @@ int main() 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), ""); diff --git a/libcxx/test/strings/c.strings/cwchar.pass.cpp b/libcxx/test/strings/c.strings/cwchar.pass.cpp index 2a0029e19fd..d0481b70610 100644 --- a/libcxx/test/strings/c.strings/cwchar.pass.cpp +++ b/libcxx/test/strings/c.strings/cwchar.pass.cpp @@ -32,10 +32,14 @@ int main() { 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 @@ int main() 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), ""); |