X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libs%2Frange%2Ftest%2Fadaptor_test%2Fmap_values_example.cpp;h=bfa533fd0652b51ad01314438f0fd7eb6edb8e91;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=dfb32e91feb2c0c2ec95a8719bf49736a5ca03dd;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/libs/range/test/adaptor_test/map_values_example.cpp b/libs/range/test/adaptor_test/map_values_example.cpp index dfb32e9..bfa533f 100644 --- a/libs/range/test/adaptor_test/map_values_example.cpp +++ b/libs/range/test/adaptor_test/map_values_example.cpp @@ -8,14 +8,16 @@ // // For more information, see http://www.boost.org/libs/range/ // +//[map_values_example #include #include #include -#include +#include #include #include #include +//<- #include #include @@ -23,29 +25,33 @@ namespace { - void map_values_example_test() - { - using namespace boost::assign; - using namespace boost::adaptors; +void map_values_example_test() +//-> +//=int main(int argc, const char* argv[]) +{ + using namespace boost::assign; + using namespace boost::adaptors; - std::map input; - for (int i = 0; i < 10; ++i) - input.insert(std::make_pair(i, i * 10)); + std::map input; + for (int i = 0; i < 10; ++i) + input.insert(std::make_pair(i, i * 10)); - boost::copy( - input | map_values, - std::ostream_iterator(std::cout, ",")); + boost::copy( + input | map_values, + std::ostream_iterator(std::cout, ",")); - - std::vector reference; - reference += 0,10,20,30,40,50,60,70,80,90; +//= return 0; +//=} +//] + std::vector reference; + reference += 0,10,20,30,40,50,60,70,80,90; - std::vector test; - boost::push_back(test, input | map_values); + std::vector test; + boost::push_back(test, input | map_values); - BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), - test.begin(), test.end() ); - } + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + test.begin(), test.end() ); +} } boost::unit_test::test_suite*