From 311e1693760204367c411841e7a66d3ec92a1e86 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 10 Dec 2012 20:10:12 +0000 Subject: [PATCH] Merge extra tests for Boost.StringAlgo.Split to release [SVN r81835] --- string/test/split_test.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/string/test/split_test.cpp b/string/test/split_test.cpp index 89d1083..740e6d1 100644 --- a/string/test/split_test.cpp +++ b/string/test/split_test.cpp @@ -144,18 +144,35 @@ void iterator_test() find_iterator fiter=make_find_iterator(str1, first_finder("xx")); + find_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()); + BOOST_CHECK(equals(*fiter2, "xx")); + + ++fiter2; + BOOST_CHECK(fiter2==find_iterator()); split_iterator siter=make_split_iterator(str1, token_finder(is_any_of("-"), token_compress_on)); + split_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;