[libstdc++] Add _GLIBCPP_USE_WCHAR_T guard to testcase

David Edelsohn dje@watson.ibm.com
Thu Jul 3 14:22:00 GMT 2003


	The recently added test 22_locale/num_put/put/char/7.cc fails on
AIX due to the testcase referencing "wcout", which is undefined if
_GLIBCPP_USE_WCHAR_T is not defined.

	* testsuite/22_locale/num_put/put/char/7.cc: Guard with
	_GLIBCPP_USE_WCHAR_T.

Index: 7.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc,v
retrieving revision 1.2
diff -c -p -r1.2 7.cc
*** 7.cc	2 Jul 2003 10:35:14 -0000	1.2
--- 7.cc	3 Jul 2003 14:16:44 -0000
***************
*** 23,28 ****
--- 23,29 ----
  #include <locale>
  #include <testsuite_hooks.h>
  
+ #ifdef _GLIBCPP_USE_WCHAR_T
  // libstdc++/9828
  void test01()
  {
*************** void test01()
*** 37,45 ****
--- 38,49 ----
    np.put(stream, wcout, ' ', static_cast<long>(10));
    VERIFY( stream.str() == "10" );
  }
+ #endif
  
  int main()
  {
+ #ifdef _GLIBCPP_USE_WCHAR_T
    test01();
+ #endif
    return 0;
  }


David



More information about the Gcc-patches mailing list