stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r635441 - /stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp
Date Mon, 10 Mar 2008 06:01:45 GMT
Author: faridz
Date: Sun Mar  9 23:01:30 2008
New Revision: 635441

URL: http://svn.apache.org/viewvc?rev=635441&view=rev
Log:
2008-03-10 Farid Zaripov <farid_zaripov@epam.com>

	* tests/regress/21.string.replace.stdcxx-170.cpp: Added testcase with
	_InputIter as string::iterator. Removed testcase with _InputIter as UChar*
	(this testcase would fail), testing with _InputIter as char* instead.

Modified:
    stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp

Modified: stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp?rev=635441&r1=635440&r2=635441&view=diff
==============================================================================
--- stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp (original)
+++ stdcxx/trunk/tests/regress/21.string.replace.stdcxx-170.cpp Sun Mar  9 23:01:30 2008
@@ -33,15 +33,17 @@
 {
     std::string s ("abc");
 
-    s.replace (s.begin (), s.begin (), s.rbegin () + 1, s.rbegin () + 2);
-
+    s.replace (s.begin (), s.begin (), s.begin () + 1, s.begin () + 2);
     assert ("babc" == s);
 
     s = "abc";
 
-    typedef const unsigned char UChar;
-    s.replace (s.begin (), s.begin (), (UChar*)&s [1], (UChar*)&s [2]);
+    s.replace (s.begin (), s.begin (), s.rbegin () + 1, s.rbegin () + 2);
+    assert ("babc" == s);
+
+    s = "abc";
 
+    s.replace (s.begin (), s.begin (), &s [1], &s [2]);
     assert ("babc" == s);
 
     return 0;



Mime
View raw message