diff --git a/src/DGtal/base/IteratorFunctions.ih b/src/DGtal/base/IteratorFunctions.ih index f85cad9574..957b6e34cb 100644 --- a/src/DGtal/base/IteratorFunctions.ih +++ b/src/DGtal/base/IteratorFunctions.ih @@ -53,7 +53,6 @@ bool DGtal::isNotEmpty( const IC& itb, const IC& ite ) template< typename IC > bool DGtal::detail::isNotEmpty( const IC& itb, const IC& ite, IteratorType ) { - trace.info() << "IteratorType = " << std::endl; return (itb != ite); } diff --git a/tests/geometry/curves/testFP.cpp b/tests/geometry/curves/testFP.cpp index 1ebbffac53..2fb8105380 100644 --- a/tests/geometry/curves/testFP.cpp +++ b/tests/geometry/curves/testFP.cpp @@ -57,7 +57,6 @@ bool testFP(string filename) { using namespace DGtal; - //using namespace LibBoard; trace.info() << endl; trace.info() << "Reading GridCurve from " << filename << endl; @@ -102,18 +101,10 @@ bool compare(const Range1& pts, const Range2& groundTruth) DGtal::GridCurve<> curve; curve.initFromPointsRange(pts.begin(), pts.end()); - std::cout << curve.size() << std::endl; - std::copy(curve.getPointsRange().begin(), curve.getPointsRange().end(), std::ostream_iterator(std::cout, " ") ); - std::cout << std::endl; - typedef DGtal::GridCurve<>::PointsRange::ConstCirculator ConstCirculator; typedef DGtal::FP FaithfulPolygon; FaithfulPolygon theFP( curve.getPointsRange().c(), curve.getPointsRange().c() ); - std::cout << theFP.polygon().size() << std::endl; - std::copy(theFP.polygon().begin(), theFP.polygon().end(), std::ostream_iterator(std::cout, " ") ); - std::cout << std::endl; - return ( (theFP.polygon().size() == groundTruth.size()) && std::equal(theFP.polygon().begin(), theFP.polygon().end(), groundTruth.begin()) ); } @@ -126,6 +117,8 @@ bool stoppingCriterionTest() int nbok = 0; int nb = 0; + trace.beginBlock ( "Stopping criterion" ); + { //inflection part, one leaning point std::vector pts, pts2; pts.push_back(Point(0,0)); @@ -252,6 +245,7 @@ bool stoppingCriterionTest() trace.info() << nbok << " / " << nb << std::endl; } + trace.endBlock(); return (nb == nbok); } @@ -261,27 +255,26 @@ bool stoppingCriterionTest() int main( int argc, char** argv ) { - DGtal::trace.beginBlock ( "Testing class FP" ); - DGtal::trace.info() << "Args:"; + using namespace DGtal; + + trace.beginBlock ( "Testing class FP" ); + trace.info() << "Args:"; for ( int i = 0; i < argc; ++i ) - DGtal::trace.info() << " " << argv[ i ]; - DGtal::trace.info() << std::endl; + trace.info() << " " << argv[ i ]; + trace.info() << endl; - std::string sinus2D4 = testPath + "samples/sinus2D4.dat"; - std::string square = testPath + "samples/smallSquare.dat"; - std::string dss = testPath + "samples/DSS.dat"; + string sinus2D4 = testPath + "samples/sinus2D4.dat"; + string square = testPath + "samples/smallSquare.dat"; + string dss = testPath + "samples/DSS.dat"; - bool res = -/*testFP(sinus2D4) + bool res = testFP(sinus2D4) && testFP(square) && testFP(dss) - //other tests - &&*/ -stoppingCriterionTest() + && stoppingCriterionTest() ; - DGtal::trace.emphase() << ( res ? "Passed." : "Error." ) << std::endl; - DGtal::trace.endBlock(); + trace.emphase() << ( res ? "Passed." : "Error." ) << endl; + trace.endBlock(); return res ? 0 : 1; } // //