From: azv Date: Wed, 19 Dec 2018 16:20:47 +0000 (+0300) Subject: [Code coverage GeomAlgoAPI]: Check errors in Ellipsoid builder X-Git-Tag: End2018~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b56d717a36d200272b7a74f14de55ac014726204;p=modules%2Fshaper.git [Code coverage GeomAlgoAPI]: Check errors in Ellipsoid builder --- diff --git a/src/GDMLPlugin/Test/TestEllipsoid.py b/src/GDMLPlugin/Test/TestEllipsoid.py index 3f7080d20..e113b8739 100644 --- a/src/GDMLPlugin/Test/TestEllipsoid.py +++ b/src/GDMLPlugin/Test/TestEllipsoid.py @@ -74,6 +74,41 @@ model.testNbSubShapes(Ellipsoid_4, GeomAPI_Shape.EDGE, [7]) model.testNbSubShapes(Ellipsoid_4, GeomAPI_Shape.VERTEX, [14]) model.testResultsVolumes(Ellipsoid_4, [5726.87643051263]) +# Check ellipsoid errors +Part_5 = model.addPart(partSet) +Part_5_doc = Part_5.document() +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 0, 20, 30) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 10, 0, 30) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 10, 20, 0) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 10, 20, 30, -5, 5) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 10, 20, 30, 5, -5) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +Ellipsoid_5 = model.addEllipsoid(Part_5_doc, 10, 20, 30, 0, 0) +model.do() +assert(Ellipsoid_5.feature().error() != "") +Part_5_doc.removeFeature(Ellipsoid_5.feature()) + +partSet.removeFeature(Part_5.feature()) + model.end() assert(model.checkPythonDump())