|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81615 - trunk/libs/algorithm/string/test
From: marshall_at_[hidden]
Date: 2012-11-28 13:19:38
Author: marshall
Date: 2012-11-28 13:19:36 EST (Wed, 28 Nov 2012)
New Revision: 81615
URL: http://svn.boost.org/trac/boost/changeset/81615
Log:
Added tests for assignment of Boost::find_iterator and split_iterator; Refs #7746
Text files modified:
trunk/libs/algorithm/string/test/split_test.cpp | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
Modified: trunk/libs/algorithm/string/test/split_test.cpp
==============================================================================
--- trunk/libs/algorithm/string/test/split_test.cpp (original)
+++ trunk/libs/algorithm/string/test/split_test.cpp 2012-11-28 13:19:36 EST (Wed, 28 Nov 2012)
@@ -144,18 +144,35 @@
find_iterator<string::iterator> fiter=make_find_iterator(str1, first_finder("xx"));
+ find_iterator<string::iterator> fiter2;
+
BOOST_CHECK(equals(*fiter, "xx"));
++fiter;
- BOOST_CHECK(equals(*fiter, "xx"));
+
+ fiter2 = fiter;
+ BOOST_CHECK(equals(*fiter, "xx"));
+ BOOST_CHECK(equals(*fiter2, "xx"));
+
++fiter;
BOOST_CHECK(fiter==find_iterator<string::iterator>());
+ BOOST_CHECK(equals(*fiter2, "xx"));
+
+ ++fiter2;
+ BOOST_CHECK(fiter2==find_iterator<string::iterator>());
split_iterator<string::iterator> siter=make_split_iterator(str1, token_finder(is_any_of("-"), token_compress_on));
+ split_iterator<string::iterator> siter2;
BOOST_CHECK(equals(*siter, "xx"));
++siter;
- BOOST_CHECK(equals(*siter, "abc"));
+
+ siter2 = siter;
+ BOOST_CHECK(equals(*siter, "abc"));
+ BOOST_CHECK(equals(*siter2, "abc"));
+
++siter;
- BOOST_CHECK(equals(*siter, "xx"));
+ BOOST_CHECK(equals(*siter, "xx"));
+ BOOST_CHECK(equals(*siter2, "abc"));
+
++siter;
BOOST_CHECK(equals(*siter, "abb"));
++siter;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk