// // Works against boost_1_48_0, fails on 1_53_0 // g++ -Ie:/Software/Open/lib/boost_1_48_0 -o fi.exe find_iterator_test.cpp && fi.exe // g++ -IF:/boost/GCC/release/boost -o fi.exe find_iterator_test.cpp && fi.exe // #include #include #include #include using namespace boost::algorithm; using namespace std; void find_iterator_test() { string s1("abc def ghi jkl"); //BOOST_CHECKPOINT("make_find_iterator ... token_compress_on"); find_iterator fEnd; find_iterator fxIt = make_find_iterator(s1, token_finder(is_alnum(), token_compress_on)); BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("abc"))); ++fxIt; BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("def"))); ++fxIt; BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("ghi"))); ++fxIt; BOOST_CHECK((fxIt != fEnd) && (*fxIt == string("jkl"))); ++fxIt; BOOST_CHECK(fxIt == fEnd); } int test_main( int, char*[] ) { find_iterator_test(); return 0; }