| 63 | }; |
| 64 | |
| 65 | TEST_F(TopoShapeMakeShapeWithElementMapTests, nullShapeThrows) |
| 66 | { |
| 67 | // Arrange |
| 68 | auto [cube1, cube2] = PartTestHelpers::CreateTwoCubes(); |
| 69 | std::vector<Part::TopoShape> sources {cube1, cube2}; |
| 70 | TopoDS_Vertex nullVertex; |
| 71 | TopoDS_Edge nullEdge; |
| 72 | TopoDS_Wire nullWire; |
| 73 | TopoDS_Face nullFace; |
| 74 | TopoDS_Shell nullShell; |
| 75 | TopoDS_Solid nullSolid; |
| 76 | TopoDS_CompSolid nullCompSolid; |
| 77 | TopoDS_Compound nullCompound; |
| 78 | |
| 79 | // Act and assert |
| 80 | EXPECT_THROW( |
| 81 | Shape()->makeShapeWithElementMap(nullVertex, *Mapper(), sources), |
| 82 | Part::NullShapeException |
| 83 | ); |
| 84 | EXPECT_THROW( |
| 85 | Shape()->makeShapeWithElementMap(nullEdge, *Mapper(), sources), |
| 86 | Part::NullShapeException |
| 87 | ); |
| 88 | EXPECT_THROW( |
| 89 | Shape()->makeShapeWithElementMap(nullWire, *Mapper(), sources), |
| 90 | Part::NullShapeException |
| 91 | ); |
| 92 | EXPECT_THROW( |
| 93 | Shape()->makeShapeWithElementMap(nullFace, *Mapper(), sources), |
| 94 | Part::NullShapeException |
| 95 | ); |
| 96 | EXPECT_THROW( |
| 97 | Shape()->makeShapeWithElementMap(nullShell, *Mapper(), sources), |
| 98 | Part::NullShapeException |
| 99 | ); |
| 100 | EXPECT_THROW( |
| 101 | Shape()->makeShapeWithElementMap(nullSolid, *Mapper(), sources), |
| 102 | Part::NullShapeException |
| 103 | ); |
| 104 | EXPECT_THROW( |
| 105 | Shape()->makeShapeWithElementMap(nullCompSolid, *Mapper(), sources), |
| 106 | Part::NullShapeException |
| 107 | ); |
| 108 | EXPECT_THROW( |
| 109 | Shape()->makeShapeWithElementMap(nullCompound, *Mapper(), sources), |
| 110 | Part::NullShapeException |
| 111 | ); |
| 112 | } |
| 113 | |
| 114 | std::map<IndexedName, MappedName> elementMap(const TopoShape& shape) |
| 115 | { |
nothing calls this directly
no test coverage detected