Get some of wchar_h.pass.cpp working on apple.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de66c515de
commit
ea33904773
@ -9,11 +9,6 @@
|
||||
|
||||
// <wchar.h>
|
||||
|
||||
// This test fails on systems whose C library doesn't provide a correct overload
|
||||
// set for wcschr, wcspbrk, wcsrchr, wcsstr, and wmemchr. There's no way for
|
||||
// libc++ to fix that on the C library's behalf.
|
||||
//
|
||||
// XFAIL: apple-darwin
|
||||
|
||||
#include <wchar.h>
|
||||
#include <type_traits>
|
||||
@ -79,19 +74,19 @@ int main()
|
||||
static_assert((std::is_same<decltype(wcscoll(L"", L"")), int>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsncmp(L"", L"", s)), int>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsxfrm(ws, L"", s)), size_t>::value), "");
|
||||
static_assert((std::is_same<decltype(wcschr((const wchar_t*)0, L' ')), const wchar_t*>::value), "");
|
||||
// const wchar_t* wcschr((const wchar_t*)0, L' ') - See below
|
||||
static_assert((std::is_same<decltype(wcschr((wchar_t*)0, L' ')), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcscspn(L"", L"")), size_t>::value), "");
|
||||
static_assert((std::is_same<decltype(wcslen(L"")), size_t>::value), "");
|
||||
static_assert((std::is_same<decltype(wcspbrk((const wchar_t*)0, L"")), const wchar_t*>::value), "");
|
||||
// const wchar_t* wcspbrk((const wchar_t*)0, L"") - See below
|
||||
static_assert((std::is_same<decltype(wcspbrk((wchar_t*)0, L"")), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsrchr((const wchar_t*)0, L' ')), const wchar_t*>::value), "");
|
||||
// const wchar_t* wcsrchr((const wchar_t*)0, L' ') - See below
|
||||
static_assert((std::is_same<decltype(wcsrchr((wchar_t*)0, L' ')), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsspn(L"", L"")), size_t>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsstr((const wchar_t*)0, L"")), const wchar_t*>::value), "");
|
||||
// const wchar_t* wcsstr((const wchar_t*)0, L"") - See below
|
||||
static_assert((std::is_same<decltype(wcsstr((wchar_t*)0, L"")), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcstok(ws, L"", (wchar_t**)0)), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wmemchr((const wchar_t*)0, L' ', s)), const wchar_t*>::value), "");
|
||||
// const wchar_t* wmemchr((const wchar_t*)0, L' ', s) - See below
|
||||
static_assert((std::is_same<decltype(wmemchr((wchar_t*)0, L' ', s)), wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wmemcmp(L"", L"", s)), int>::value), "");
|
||||
static_assert((std::is_same<decltype(wmemcpy(ws, L"", s)), wchar_t*>::value), "");
|
||||
@ -107,6 +102,17 @@ int main()
|
||||
static_assert((std::is_same<decltype(mbsrtowcs(ws, (const char**)0, s, &mb)), size_t>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsrtombs(ns, (const wchar_t**)0, s, &mb)), size_t>::value), "");
|
||||
|
||||
// This test fails on systems whose C library doesn't provide a correct overload
|
||||
// set for wcschr, wcspbrk, wcsrchr, wcsstr, and wmemchr. There's no way for
|
||||
// libc++ to fix that on the C library's behalf.
|
||||
#ifndef __APPLE__
|
||||
static_assert((std::is_same<decltype(wcschr((const wchar_t*)0, L' ')), const wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcspbrk((const wchar_t*)0, L"")), const wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsrchr((const wchar_t*)0, L' ')), const wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wcsstr((const wchar_t*)0, L"")), const wchar_t*>::value), "");
|
||||
static_assert((std::is_same<decltype(wmemchr((const wchar_t*)0, L' ', s)), const wchar_t*>::value), "");
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_STDIN
|
||||
static_assert((std::is_same<decltype(getwchar()), wint_t>::value), "");
|
||||
static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user