This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] fix non-wchar_t tests



tested x86/linux

2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/ctype_is_wchar_t.cc: Guard with
	_GLIBCPP_USE_WCHAR_T.
	* testsuite/22_locale/ctype_narrow_wchar_t.cc: Same.
	* testsuite/22_locale/ctype_to_wchar_t.cc: Same.
	* testsuite/22_locale/ctype_widen_wchar_t.cc: Same.
  
Index: testsuite/22_locale/ctype_is_wchar_t.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_is_wchar_t.cc
*** testsuite/22_locale/ctype_is_wchar_t.cc	24 May 2002 16:02:39 -0000	1.1
--- testsuite/22_locale/ctype_is_wchar_t.cc	27 May 2002 11:12:31 -0000
***************
*** 34,39 ****
--- 34,40 ----
  // XXX This test (test02) is not working for non-glibc locale models.
  // { dg-do run { xfail *-*-* } }
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
  typedef wchar_t char_type;
  class gnu_ctype: public std::ctype<char_type> { };
  
*************** void test05()
*** 183,193 ****
--- 184,197 ----
        VERIFY( preLANG == postLANG );
      }
  }
+ #endif
  
  int main() 
  {
+ #ifdef _GLIBCPP_USE_WCHAR_T
    test01();
    test04();
    test05();
+ #endif
    return 0;
  }
Index: testsuite/22_locale/ctype_narrow_wchar_t.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/22_locale/ctype_narrow_wchar_t.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_narrow_wchar_t.cc
*** testsuite/22_locale/ctype_narrow_wchar_t.cc	24 May 2002 16:02:39 -0000	1.1
--- testsuite/22_locale/ctype_narrow_wchar_t.cc	27 May 2002 11:12:31 -0000
***************
*** 33,38 ****
--- 33,39 ----
  #include <vector>
  #include <testsuite_hooks.h>
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
  // libstdc++/6701
  void test01()
  {
*************** void test02()
*** 94,103 ****
    for (int i = 0; i < wide.length(); ++i)
      VERIFY( narrow_chars[i] == narrow[i] );
  }
  
  int main() 
  {
    test01();
    test02();
!   return 0;
  }
--- 95,107 ----
    for (int i = 0; i < wide.length(); ++i)
      VERIFY( narrow_chars[i] == narrow[i] );
  }
+ #endif
  
  int main() 
  {
+ #ifdef _GLIBCPP_USE_WCHAR_T
    test01();
    test02();
! #endif
!  return 0;
  }
Index: testsuite/22_locale/ctype_to_wchar_t.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_to_wchar_t.cc
*** testsuite/22_locale/ctype_to_wchar_t.cc	24 May 2002 16:02:39 -0000	1.1
--- testsuite/22_locale/ctype_to_wchar_t.cc	27 May 2002 11:12:31 -0000
***************
*** 30,35 ****
--- 30,36 ----
  #include <locale>
  #include <testsuite_hooks.h>
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
  typedef wchar_t char_type;
  class gnu_ctype: public std::ctype<char_type> { };
  
*************** void test05()
*** 130,140 ****
--- 131,144 ----
        VERIFY( preLANG == postLANG );
      }
  }
+ #endif
  
  int main() 
  {
+ #ifdef _GLIBCPP_USE_WCHAR_T
    test01();
    test04();
    test05();
+ #endif
    return 0;
  }
Index: testsuite/22_locale/ctype_widen_wchar_t.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/22_locale/ctype_widen_wchar_t.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_widen_wchar_t.cc
*** testsuite/22_locale/ctype_widen_wchar_t.cc	24 May 2002 16:02:39 -0000	1.1
--- testsuite/22_locale/ctype_widen_wchar_t.cc	27 May 2002 11:12:31 -0000
***************
*** 33,38 ****
--- 33,39 ----
  #include <vector>
  #include <testsuite_hooks.h>
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
  void test01()
  {
    using namespace std;
*************** void test01()
*** 59,67 ****
--- 60,71 ----
    for (int i = 0; i < narrow.length(); ++i)
      VERIFY( wide_chars[i] == wide[i] );
  }
+ #endif
  
  int main() 
  {
+ #ifdef _GLIBCPP_USE_WCHAR_T
    test01();
+ #endif
    return 0;
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]