|
Boost : |
From: CodeCave (codecave_at_[hidden])
Date: 2006-11-22 14:23:37
79a80,109
> // Test return partial - WORKS
> {
> const string test_string = "aaabbbc";
> string answer[] = {"aaa","bbb"};
> typedef token_iterator_generator<offset_separator>::type Iter;
> boost::array<int,3> offsets = {{3,3,3}};
> offset_separator func(offsets.begin(),offsets.end(),false,false);
> Iter begin = make_token_iterator<string>(test_string.begin(),
> test_string.end(),func);
> Iter end= make_token_iterator<string>(test_string.end(),
> test_string.end(),func);
> BOOST_REQUIRE(equal(begin,end,answer));
>
> }
>
> // Test return partial - SHOULD WORK in patched version
> {
> const string test_string = "aaabbbcc";
> string answer[] = {"aaa","bbb"};
> typedef token_iterator_generator<offset_separator>::type Iter;
> boost::array<int,3> offsets = {{3,3,3}};
> offset_separator func(offsets.begin(),offsets.end(),false,false);
> Iter begin = make_token_iterator<string>(test_string.begin(),
> test_string.end(),func);
> Iter end= make_token_iterator<string>(test_string.end(),
> test_string.end(),func);
> BOOST_REQUIRE(equal(begin,end,answer));
>
> }
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk