diff --git a/tests/src/Mod/Sketcher/App/SketchObject.cpp b/tests/src/Mod/Sketcher/App/SketchObject.cpp index 12122b4146e41..f555e06ba4c2e 100644 --- a/tests/src/Mod/Sketcher/App/SketchObject.cpp +++ b/tests/src/Mod/Sketcher/App/SketchObject.cpp @@ -572,6 +572,8 @@ TEST_F(SketchObjectTest, testConstraintAfterDeletingGeo) // Arrange int geoId1 = 42, geoId2 = 10, geoId3 = 0, geoId4 = -8; + Sketcher::Constraint* nullConstr = nullptr; + Sketcher::Constraint constr1; constr1.Type = Sketcher::ConstraintType::Coincident; constr1.First = geoId1; @@ -588,6 +590,18 @@ TEST_F(SketchObjectTest, testConstraintAfterDeletingGeo) constr2.Third = geoId1; constr2.ThirdPos = Sketcher::PointPos::start; + // Act + auto nullConstrAfter = getObject()->getConstraintAfterDeletingGeo(nullConstr, 5); + + // Assert + EXPECT_EQ(nullConstrAfter, nullptr); + + // Act + getObject()->changeConstraintAfterDeletingGeo(nullConstr, 5); + + // Assert + EXPECT_EQ(nullConstr, nullptr); + // Act // delete typical in-sketch geo auto constr1PtrAfter1 = getObject()->getConstraintAfterDeletingGeo(&constr1, 5);