V3 PATCH: Disable wide-character tests where necessary

Mark P Mitchell mark@codesourcery.com
Thu Nov 2 18:29:00 GMT 2000


There's no sense running wide-characters tests on platforms without
wide-character support.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Thu Nov  2 10:11:45 2000  Mark P Mitchell  <mark@codesourcery.com>

	* 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.

Index: testsuite/22_locale/codecvt_unicode_char.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/22_locale/codecvt_unicode_char.cc,v
retrieving revision 1.4
diff -c -p -r1.4 codecvt_unicode_char.cc
*** codecvt_unicode_char.cc	2000/10/20 06:52:00	1.4
--- codecvt_unicode_char.cc	2000/11/03 02:27:44
***************
*** 25,30 ****
--- 25,32 ----
  
  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
*************** void test02()
*** 224,233 ****
--- 226,239 ----
    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;
  }
Index: testsuite/22_locale/codecvt_unicode_wchar_t.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/22_locale/codecvt_unicode_wchar_t.cc,v
retrieving revision 1.3
diff -c -p -r1.3 codecvt_unicode_wchar_t.cc
*** codecvt_unicode_wchar_t.cc	2000/10/20 06:52:00	1.3
--- codecvt_unicode_wchar_t.cc	2000/11/03 02:27:44
***************
*** 25,30 ****
--- 25,32 ----
  
  using namespace std;
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
+ 
  void
  initialize_state(__enc_traits& state)
  { state._M_init(); }
*************** void test01()
*** 118,127 ****
--- 120,132 ----
    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;
  }
Index: testsuite/22_locale/ctor_copy_dtor.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc,v
retrieving revision 1.5
diff -c -p -r1.5 ctor_copy_dtor.cc
*** ctor_copy_dtor.cc	2000/10/31 01:26:06	1.5
--- ctor_copy_dtor.cc	2000/11/03 02:27:44
***************
*** 25,30 ****
--- 25,32 ----
  #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;
*************** void test01()
*** 160,169 ****
--- 162,174 ----
    
  
  }
+ #endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
  
  int main ()
  {
+ #if _GLIBCPP_USE_WCHAR_T
    test01();
+ #endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
  
    return 0;
  }
Index: testsuite/22_locale/ctype_wchar_t_members.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/22_locale/ctype_wchar_t_members.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_wchar_t_members.cc
*** ctype_wchar_t_members.cc	2000/08/31 01:17:24	1.1
--- ctype_wchar_t_members.cc	2000/11/03 02:27:44
***************
*** 33,38 ****
--- 33,39 ----
  // 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()
*************** void test01()
*** 96,104 ****
--- 97,108 ----
    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;
  }
  


More information about the Libstdc++ mailing list