Update of /cvsroot/boost/boost/libs/algorithm/string/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv823
Modified Files:
split_test.cpp
Log Message:
find/split iterator tests added
Index: split_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/algorithm/string/test/split_test.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- split_test.cpp 14 Apr 2005 16:07:56 -0000 1.6
+++ split_test.cpp 1 Jul 2007 22:24:29 -0000 1.7
@@ -122,6 +122,25 @@
BOOST_CHECK( tokens[2]==string("") );
BOOST_CHECK( tokens[3]==string("xx") );
BOOST_CHECK( tokens[4]==string("abb") );
+
+ find_iterator<string::iterator> fiter=make_find_iterator(str1,
first_finder("xx"));
+ BOOST_CHECK(equals(*fiter, "xx"));
+ ++fiter;
+ BOOST_CHECK(equals(*fiter, "xx"));
+ ++fiter;
+ BOOST_CHECK(fiter==find_iterator<string::iterator>());
+
+ split_iterator<string::iterator> siter=make_split_iterator(str1,
token_finder(is_any_of("-"), token_compress_on));
+ BOOST_CHECK(equals(*siter, "xx"));
+ ++siter;
+ BOOST_CHECK(equals(*siter, "abc"));
+ ++siter;
+ BOOST_CHECK(equals(*siter, "xx"));
+ ++siter;
+ BOOST_CHECK(equals(*siter, "abb"));
+ ++siter;
+ BOOST_CHECK(siter==split_iterator<string::iterator>());
+
}
// test main
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs