MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / TEST_F

Function TEST_F

tests/src/Mod/Part/App/PartFeature.cpp:37–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37TEST_F(FeaturePartTest, testGetElementName)
38{
39 // Arrange
40 _common->Base.setValue(_boxes[0]);
41 _common->Tool.setValue(_boxes[1]);
42
43 // Act
44 _common->execute();
45 const TopoShape& ts = _common->Shape.getShape();
46
47 auto namePair = _common->getElementName("test");
48 auto namePairExport = _common->getElementName("test", App::GeoFeature::Export);
49 auto namePairSelf = _common->getElementName(nullptr);
50 // Assert
51 EXPECT_STREQ(namePair.newName.c_str(), "");
52 EXPECT_STREQ(namePair.oldName.c_str(), "test");
53 EXPECT_STREQ(namePairExport.newName.c_str(), "");
54 EXPECT_STREQ(namePairExport.oldName.c_str(), "test");
55 EXPECT_STREQ(namePairSelf.newName.c_str(), "");
56 EXPECT_STREQ(namePairSelf.oldName.c_str(), "");
57 EXPECT_EQ(ts.getElementMap().size(), 26);
58 // TBD
59}
60
61TEST_F(FeaturePartTest, create)
62{

Callers

nothing calls this directly

Calls 15

getElementHistoryFunction · 0.85
getUniqueDocumentNameMethod · 0.80
TopoShapeClass · 0.50
gp_PntClass · 0.50
createFunction · 0.50
setValueMethod · 0.45
executeMethod · 0.45
getShapeMethod · 0.45
getElementNameMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45
getElementMapMethod · 0.45

Tested by

no test coverage detected