summaryrefslogtreecommitdiff
path: root/libs/algorithm/test/partition_point_test1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/algorithm/test/partition_point_test1.cpp')
-rw-r--r--libs/algorithm/test/partition_point_test1.cpp9
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 );
}