diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/algorithm/test/partition_point_test1.cpp | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/algorithm/test/partition_point_test1.cpp')
-rw-r--r-- | libs/algorithm/test/partition_point_test1.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/algorithm/test/partition_point_test1.cpp b/libs/algorithm/test/partition_point_test1.cpp index 95f605803..37d517dce 100644 --- a/libs/algorithm/test/partition_point_test1.cpp +++ b/libs/algorithm/test/partition_point_test1.cpp @@ -43,16 +43,17 @@ void test_sequence ( Container &v, Predicate comp, int expected ) { res = ba::partition_point ( v.begin (), v.end (), comp ); exp = offset_to_iter ( v, expected ); - std::cout << "Expected(1): " << std::distance ( v.begin (), exp ) - << ", got: " << std::distance ( v.begin (), res ) << std::endl; BOOST_CHECK ( exp == res ); // Duplicate the last element; this checks for any even/odd problems v.push_back ( * v.rbegin ()); res = ba::partition_point ( v.begin (), v.end (), comp ); exp = offset_to_iter ( v, expected ); - std::cout << "Expected(2): " << std::distance ( v.begin (), exp ) - << ", got: " << std::distance ( v.begin (), res ) << std::endl; + BOOST_CHECK ( exp == res ); + +// Range based test + res = ba::partition_point ( v, comp ); + exp = offset_to_iter ( v, expected ); BOOST_CHECK ( exp == res ); } |