mirror of git://gcc.gnu.org/git/gcc.git
codecvt_unicode_char.cc: Don't run it if not _GLIBCPP_USE_WCHAR_T.
* testsuite/22_locale/codecvt_unicode_char.cc: Don't run it if not _GLIBCPP_USE_WCHAR_T. * testsuite/22_locale/codecvt_unicode_wchar_t.cc: Likewise. * testsuite/22_locale/ctor_copy_dtor.cc: Likewise. * testsuite/22_locale/ctype_wchar_t_members.cc: Likewise. From-SVN: r37216
This commit is contained in:
parent
dbf5ba31a8
commit
ce881b7fe4
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||||
|
|
||||||
/*
|
/*
|
||||||
> how do I check that these conversions are correct?
|
> how do I check that these conversions are correct?
|
||||||
Very easy. Since all the characters are from ASCII you simply
|
Very easy. Since all the characters are from ASCII you simply
|
||||||
|
|
@ -224,10 +226,14 @@ void test02()
|
||||||
delete [] i_arr;
|
delete [] i_arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
test01();
|
test01();
|
||||||
test02();
|
test02();
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||||
|
|
||||||
void
|
void
|
||||||
initialize_state(__enc_traits& state)
|
initialize_state(__enc_traits& state)
|
||||||
{ state._M_init(); }
|
{ state._M_init(); }
|
||||||
|
|
@ -118,10 +120,13 @@ void test01()
|
||||||
delete [] e_arr;
|
delete [] e_arr;
|
||||||
delete [] i_arr;
|
delete [] i_arr;
|
||||||
}
|
}
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
test01();
|
test01();
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <debug_assert.h>
|
#include <debug_assert.h>
|
||||||
|
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
|
|
||||||
typedef std::codecvt<char, char, std::mbstate_t> c_codecvt;
|
typedef std::codecvt<char, char, std::mbstate_t> c_codecvt;
|
||||||
typedef std::codecvt_byname<char, char, std::mbstate_t> c_codecvt_byname;
|
typedef std::codecvt_byname<char, char, std::mbstate_t> c_codecvt_byname;
|
||||||
typedef std::codecvt<wchar_t, char, std::mbstate_t> w_codecvt;
|
typedef std::codecvt<wchar_t, char, std::mbstate_t> w_codecvt;
|
||||||
|
|
@ -160,10 +162,13 @@ void test01()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
test01();
|
test01();
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
// NB: Don't include any other headers in this file.
|
// NB: Don't include any other headers in this file.
|
||||||
#include <debug_assert.h>
|
#include <debug_assert.h>
|
||||||
|
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
class gnu_ctype: public std::ctype<wchar_t> {};
|
class gnu_ctype: public std::ctype<wchar_t> {};
|
||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
|
|
@ -96,9 +97,12 @@ void test01()
|
||||||
assert(test);
|
assert(test);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
#if _GLIBCPP_USE_WCHAR_T
|
||||||
test01();
|
test01();
|
||||||
|
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue