From: azv Date: Tue, 18 Dec 2018 15:41:02 +0000 (+0300) Subject: [Code coverage GeomAPI]: Improve coverage quality X-Git-Tag: End2018~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=280a49b40a59dbfe25350866737532f267b2b106;p=modules%2Fshaper.git [Code coverage GeomAPI]: Improve coverage quality --- diff --git a/src/GeomAPI/GeomAPI_Box.cpp b/src/GeomAPI/GeomAPI_Box.cpp index 68fe4db81..76189f460 100644 --- a/src/GeomAPI/GeomAPI_Box.cpp +++ b/src/GeomAPI/GeomAPI_Box.cpp @@ -43,12 +43,6 @@ struct Box #define MY_BOX implPtr() -//================================================================================================= -GeomAPI_Box::GeomAPI_Box() - : GeomAPI_Interface(new Box(std::shared_ptr(new GeomAPI_Ax3), 0., 0., 0.)) -{ -} - //================================================================================================= GeomAPI_Box::GeomAPI_Box(const std::shared_ptr& theCorner, const double theWidth, diff --git a/src/GeomAPI/GeomAPI_Box.h b/src/GeomAPI/GeomAPI_Box.h index c3c9673cc..07b9130a6 100644 --- a/src/GeomAPI/GeomAPI_Box.h +++ b/src/GeomAPI/GeomAPI_Box.h @@ -34,9 +34,6 @@ class GeomAPI_Pnt; class GeomAPI_Box : public GeomAPI_Interface { public: - /// Default constructor - GEOMAPI_EXPORT GeomAPI_Box(); - /// Creation of torus defined by center point, direction, major and minor radii GEOMAPI_EXPORT GeomAPI_Box(const std::shared_ptr& theCorner, const double theWidth, diff --git a/src/GeomAPI/GeomAPI_Shape.cpp b/src/GeomAPI/GeomAPI_Shape.cpp index c4f30b6d3..d7840b168 100644 --- a/src/GeomAPI/GeomAPI_Shape.cpp +++ b/src/GeomAPI/GeomAPI_Shape.cpp @@ -152,6 +152,7 @@ bool GeomAPI_Shape::isCompoundOfSolids() const return isAtLeastOne; } +// LCOV_EXCL_START GeomAPI_Shape::ShapeType GeomAPI_Shape::typeOfCompoundShapes() const { const TopoDS_Shape& aShape = const_cast(this)->impl(); @@ -168,6 +169,7 @@ GeomAPI_Shape::ShapeType GeomAPI_Shape::typeOfCompoundShapes() const } return (GeomAPI_Shape::ShapeType) aType; } +// LCOV_EXCL_STOP // adds the nopt-compound elements recursively to the list static void addSimpleToList(const TopoDS_Shape& theShape, NCollection_List& theList) @@ -609,6 +611,7 @@ GeomPointPtr GeomAPI_Shape::middlePoint() const return aMiddlePoint; } +// LCOV_EXCL_START std::string GeomAPI_Shape::getShapeStream() const { std::ostringstream aStream; @@ -616,6 +619,7 @@ std::string GeomAPI_Shape::getShapeStream() const BRepTools::Write(aShape, aStream); return aStream.str(); } +// LCOV_EXCL_STOP GeomShapePtr GeomAPI_Shape::intersect(const GeomShapePtr theShape) const { diff --git a/src/GeomAPI/Test/TestCone.py b/src/GeomAPI/Test/TestCone.py index 7c92fb34d..f389e91c4 100644 --- a/src/GeomAPI/Test/TestCone.py +++ b/src/GeomAPI/Test/TestCone.py @@ -77,6 +77,8 @@ def checkEllipseFace(theDocument, theFaceName, theFirstFocus, theSecondFocus, th def assertCone(theCone, theApex, theAxis, theSemiAngle, theRadius1, theRadius2, theHeight): assert(theCone is not None) + assert(theCone.isSemiInfinite() == False) + assert(theCone.isInfinite() == False) anApex = theCone.apex() anAxis = theCone.axis() assert(anApex.distance(theApex) < TOLERANCE), "({}, {}, {}) != expected ({}, {}, {})".format(anApex.x(), anApex.y(), anApex.z(), theApex.x(), theApex.y(), theApex.z()) diff --git a/src/GeomAPI/Test/TestCylinder.py b/src/GeomAPI/Test/TestCylinder.py index c423f72e1..9091faee8 100644 --- a/src/GeomAPI/Test/TestCylinder.py +++ b/src/GeomAPI/Test/TestCylinder.py @@ -29,6 +29,7 @@ TOLERANCE = 1.e-7 def assertCylinder(theCylinder, theLocation, theAxis, theRadius, theHeight): assert(theCylinder is not None) + assert(theCylinder.isInfinite() == False) aLoc = theCylinder.location() aDir = theCylinder.axis() assert(aLoc.distance(theLocation) < TOLERANCE), "({}, {}, {}) != expected ({}, {}, {})".format(aLoc.x(), aLoc.y(), aLoc.z(), theLocation.x(), theLocation.y(), theLocation.z())