Ticket #3023: minmax.patch
File minmax.patch, 1.3 KB (added by , 13 years ago) |
---|
-
minmax_test.cpp
54 54 less_count<Value> lc(counter); 55 55 56 56 // Test functionality 57 tuple<Value const&, Value const&> result1 = minmax(zero, one);57 tuple<Value const&, Value const&> result1 = boost::minmax(zero, one); 58 58 BOOST_CHECK_EQUAL( get<0>(result1), zero ); 59 59 BOOST_CHECK_EQUAL( get<1>(result1), one ); 60 60 61 tuple<Value const&, Value const&> result2 = minmax(one, zero);61 tuple<Value const&, Value const&> result2 = boost::minmax(one, zero); 62 62 BOOST_CHECK_EQUAL( get<0>(result2), zero ); 63 63 BOOST_CHECK_EQUAL( get<1>(result2), one ); 64 64 65 65 // Test functionality and number of comparisons 66 66 lc.reset(); 67 tuple<Value const&, Value const&> result3 = minmax(zero, one, lc );67 tuple<Value const&, Value const&> result3 = boost::minmax(zero, one, lc ); 68 68 BOOST_CHECK_EQUAL( get<0>(result3), zero ); 69 69 BOOST_CHECK_EQUAL( get<1>(result3), one ); 70 70 BOOST_CHECK_EQUAL( counter, 1 ); 71 71 72 72 lc.reset(); 73 tuple<Value const&, Value const&> result4 = minmax(one, zero, lc );73 tuple<Value const&, Value const&> result4 = boost::minmax(one, zero, lc ); 74 74 BOOST_CHECK_EQUAL( get<0>(result4), zero ); 75 75 BOOST_CHECK_EQUAL( get<1>(result4), one ); 76 76 BOOST_CHECK_EQUAL( counter, 1);