]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[Code coverage GeomAlgoAPI]: Check errors in Ellipsoid builder
authorazv <azv@opencascade.com>
Wed, 19 Dec 2018 16:20:47 +0000 (19:20 +0300)
committerazv <azv@opencascade.com>
Wed, 19 Dec 2018 16:20:47 +0000 (19:20 +0300)
src/GDMLPlugin/Test/TestEllipsoid.py

index 3f7080d2049e952fc411c607a1c3282b58634bf5..e113b87397d4cf79ccb14cf23f8b9314e617266e 100644 (file)
@@ -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())