aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>2000-11-03 02:28:07 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-11-03 02:28:07 +0000
commitce881b7fe4fd5145e8001f4ce89f6f1ba2e19518 (patch)
treea2323899e872c33018b673fada960d1459982f11
parentdbf5ba31a884fee7880faec9d2b30955afb08cb6 (diff)
downloadgcc-ce881b7fe4fd5145e8001f4ce89f6f1ba2e19518.zip
gcc-ce881b7fe4fd5145e8001f4ce89f6f1ba2e19518.tar.gz
gcc-ce881b7fe4fd5145e8001f4ce89f6f1ba2e19518.tar.bz2
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
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc4
4 files changed, 20 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc
index fef0c3d..86fbc69 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc
@@ -25,6 +25,8 @@
using namespace std;
+#ifdef _GLIBCPP_USE_WCHAR_T
+
/*
> how do I check that these conversions are correct?
Very easy. Since all the characters are from ASCII you simply
@@ -224,10 +226,14 @@ void test02()
delete [] i_arr;
}
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
+
int main ()
{
+#if _GLIBCPP_USE_WCHAR_T
test01();
test02();
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc
index 8f894cc..606c716 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc
@@ -25,6 +25,8 @@
using namespace std;
+#ifdef _GLIBCPP_USE_WCHAR_T
+
void
initialize_state(__enc_traits& state)
{ state._M_init(); }
@@ -118,10 +120,13 @@ void test01()
delete [] e_arr;
delete [] i_arr;
}
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
int main ()
{
+#if _GLIBCPP_USE_WCHAR_T
test01();
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc
index 64433ee..0c723bf 100644
--- a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc
@@ -25,6 +25,8 @@
#include <stdexcept>
#include <debug_assert.h>
+#if _GLIBCPP_USE_WCHAR_T
+
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<wchar_t, char, std::mbstate_t> w_codecvt;
@@ -160,10 +162,13 @@ void test01()
}
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
int main ()
{
+#if _GLIBCPP_USE_WCHAR_T
test01();
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc b/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc
index ad8452a..f4a104e 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc
@@ -33,6 +33,7 @@
// NB: Don't include any other headers in this file.
#include <debug_assert.h>
+#if _GLIBCPP_USE_WCHAR_T
class gnu_ctype: public std::ctype<wchar_t> {};
void test01()
@@ -96,9 +97,12 @@ void test01()
assert(test);
#endif
}
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
int main() {
+#if _GLIBCPP_USE_WCHAR_T
test01();
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
return 0;
}