]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/tr1/8_c_compatibility/cwchar/functions.cc
3 // 2006-02-03 Paolo Carlini <pcarlini@suse.de>
5 // Copyright (C) 2006 Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 2, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING. If not, write to the Free
20 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 // 8.6 Additions to header <cwchar>
29 #if _GLIBCXX_USE_WCHAR_T
31 void test01(int dummy
, ...)
36 #if _GLIBCXX_HAVE_WCSTOF
37 const wchar_t* nptr1
= 0;
38 wchar_t** endptr1
= 0;
40 fret
= std::tr1::wcstof(nptr1
, endptr1
);
43 #if _GLIBCXX_HAVE_VFWSCANF
45 const wchar_t* format1
= 0;
47 ret1
= std::tr1::vfwscanf(stream
, format1
, arg
);
50 #if _GLIBCXX_HAVE_VSWSCANF
52 const wchar_t* format2
= 0;
54 ret2
= std::tr1::vswscanf(s
, format2
, arg
);
57 #if _GLIBCXX_HAVE_VWSCANF
58 const wchar_t* format3
= 0;
60 ret3
= std::tr1::vwscanf(format3
, arg
);
65 const wchar_t* nptr2
= 0;
66 wchar_t** endptr2
= 0;
68 ldret
= std::tr1::wcstold(nptr2
, endptr2
);
72 unsigned long long ullret
;
73 llret
= std::tr1::wcstoll(nptr2
, endptr2
, base
);
74 ullret
= std::tr1::wcstoull(nptr2
, endptr2
, base
);