More testsuite patches

Anthony Williams anthony_w.geo@yahoo.com
Wed Jun 7 04:25:00 GMT 2000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

testsuite/27_io/stringstream.cc: Removed unnecessary char * pointers
from test01, so no need to call base(), which isn't guaranteed to be
implemented as iterators may themselves be pointers

testsuite/27_io/stringbuf.cc: Removed unnecessary calls to
_M_position() - use implicit conversion to streamoff instead

Index: stringstream.cc
===================================================================
RCS file:
/cvs/gcc/egcs/libstdc++-v3/testsuite/27_io/stringstream.cc,v
retrieving revision 1.1
diff -u -p -r1.1 stringstream.cc
- --- stringstream.cc     2000/04/21 20:33:34     1.1
+++ stringstream.cc     2000/06/07 11:21:37
@@ -44,33 +44,27 @@ std::string test01()
   // Empty string sanity check.
   std::string str01;
   std::string::iterator __i_start = str01.begin();
- -  char* __p_start = __i_start.base();
   std::string::iterator __i_end = str01.end();
- -  char* __p_end = __i_end.base();
   std::string::size_type len = str01.size();
- -  test = __p_start == __p_end;
+  test = __i_start == __i_end;
   test &= len == 0;
 
   // Full string sanity check.
   std::string str02("these golden days, i spend waiting for you:\n 
               Betty Carter on Verve with I'm Yours and You're
Mine.");
   __i_start = str02.begin();
- -  __p_start = __i_start.base();
   __i_end = str02.end();
- -  __p_end = __i_end.base();
   len = str02.size();
- -  test &= __p_start != __p_end;
+  test &= __i_start != __i_end;
   test &= len != 0;
  
   // Test an empty ostring stream for sanity.
   std::ostringstream ostrstream0;
   std::string str03 = ostrstream0.str();
   __i_start = str03.begin();
- -  __p_start = __i_start.base();
   __i_end = str03.end();
- -  __p_end = __i_end.base();
   len = str03.size();
- -  test &= __p_start == __p_end;
+  test &= __i_start == __i_end;
   test &= len == 0;
   test &= str01 == str03;

Index: stringbuf.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/27_io/stringbuf.cc,v
retrieving revision 1.1
diff -r1.1 stringbuf.cc
341c341
<   off_1 = pt_1._M_position();
- ---
>   off_1 = pt_1;
350c350
<   off_1 = pt_1._M_position();
- ---
>   off_1 = pt_1;
353c353
<   off_1 = pt_1._M_position();
- ---
>   off_1 = pt_1;
355c355
<   off_2 = pt_2._M_position();
- ---
>   off_2 = pt_2;
364c364
<   off_1 = pt_2._M_position();
- ---
>   off_1 = pt_2;
396c396
<   off_1 = pt_1._M_position();
- ---
>   off_1 = pt_1;
399c399
<   off_1 = pt_1._M_position();
- ---
>   off_1 = pt_1;
407c407
<   off_2 = pt_2._M_position();
- ---
>   off_2 = pt_2;


PGP Fingerprint: 
0E2D D32A 8732 DC31 804C  D435 9BF0 F8FE 1C1B 9AD5
PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use < http://www.pgp.com >
Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

iQA/AwUBOT4wqpvw+P4cG5rVEQILjQCg4iLCwD/WH6g8p7Eap0SKPQStjngAnjvz
KPiYnUpc3lOqv5CdWZClBhqf
=SLmR
-----END PGP SIGNATURE-----



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


More information about the Libstdc++ mailing list