Skip to content

Commit

Permalink
Tests: Add unit test to explore a null shape
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 22, 2024
1 parent 2197d62 commit a4bc062
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/Mod/Part/App/TopoDS_Shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
#include <gtest/gtest.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Standard_TypeMismatch.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>

// NOLINTBEGIN
Expand Down Expand Up @@ -34,5 +36,12 @@ TEST(TopoDS_Shape, TestCastNullEdge)
EXPECT_TRUE(vertex.IsNull());
}

TEST(TopoDS_Shape, TestExploreNullShape)
{
TopoDS_Face face;
TopExp_Explorer xp(face, TopAbs_FACE);
EXPECT_FALSE(xp.More());
}

// clang-format on
// NOLINTEND

0 comments on commit a4bc062

Please sign in to comment.