Part/Toponaming: Tests for flushElementMap and resetElementMap (#12471)
* Part/Toponaming: tests for flushElementMap and resetElementMap * Added test for resetElementMap() * Added test for flushElementMap() * restored ComplexGeoData::resetElementMap to RT fork * modified TopoShape::resetElementMap to match the restored signature of ComplexGeoData::resetElementMap * added checks in TopoShape::makeShapeWithElementMap to avoid segfaults * added check in TopoShape::setElementComboName to avoid segfaults * restored testFindSubShapesForSourceWithTypeAndIndex * modified test saveDocFileWithNoElementMap to match the restored signature of ComplexGeoData::resetElementMap * Part/Toponaming: tests for flushElementMap and resetElementMap * Removed comments in ComplexGeoData::resetElementMap() * Changed TopoShape::resetElementMap():: from virtual to override * Removed comment in TopoShape::resetElementMap() * Added comments about differences between main and RT fork * Removed comment in test saveDocFileWithNoElementMap * Updated expected test result in makeElementCompoundTwoShapesGeneratesMap * Updated expected test result in resetElementMapTest * Fixed typo in test flushElementMapTest * Part/Toponaming: tests for flushElementMap and resetElementMap * updated expected tests results after previous methods modifications --------- Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cbc39e989f
commit
0e7aa5f7bc
@@ -134,7 +134,10 @@ TEST_F(TopoShapeMakeShapeWithElementMapTests, mapCompoundCount)
|
||||
EXPECT_STREQ(sources[0].shapeName().c_str(), "Compound");
|
||||
EXPECT_STREQ(sources[1].shapeName().c_str(), "Compound");
|
||||
EXPECT_STREQ(compound.shapeName().c_str(), "Compound");
|
||||
EXPECT_EQ(6, compound.getMappedChildElements().size());
|
||||
EXPECT_EQ(
|
||||
22,
|
||||
compound.getMappedChildElements().size()); // Changed with PR#12471. Probably will change
|
||||
// again after importing other TopoNaming logics
|
||||
}
|
||||
|
||||
TEST_F(TopoShapeMakeShapeWithElementMapTests, emptySourceShapes)
|
||||
@@ -232,9 +235,9 @@ void testFindSubShapesForSourceWithTypeAndIndex(const std::string& shapeTypeStr,
|
||||
|
||||
EXPECT_NO_THROW(elementStdMap.at(indexedName)); // We check that the IndexedName
|
||||
// is one of the keys...
|
||||
EXPECT_EQ(mappedName.find(shapeName.c_str()),
|
||||
EXPECT_NE(mappedName.find(shapeName.c_str()),
|
||||
-1); // ... that the element name is in the MappedName...
|
||||
EXPECT_NE(mappedName.toString().back(), shapeTypePrefix);
|
||||
EXPECT_EQ(mappedName.toString().back(), shapeTypePrefix);
|
||||
}
|
||||
|
||||
void testFindSubShapesForSourceWithType(const TopoShape& source,
|
||||
|
||||
Reference in New Issue
Block a user