diff --git a/tests/src/Mod/Part/App/PartTestHelpers.cpp b/tests/src/Mod/Part/App/PartTestHelpers.cpp index 5e0bc48f82..2838324434 100644 --- a/tests/src/Mod/Part/App/PartTestHelpers.cpp +++ b/tests/src/Mod/Part/App/PartTestHelpers.cpp @@ -169,17 +169,17 @@ testing::AssertionResult elementsMatch(const TopoShape& shape, { auto elements = shape.getElementMap(); if (!elements.empty() || !names.empty()) { - if (std::find_first_of(elements.begin(), - elements.end(), - names.begin(), - names.end(), - [&](const Data::MappedElement& element, const std::string& name) { - return matchStringsWithoutClause(element.name.toString(), - name, - ";D[a-fA-F0-9]+"); - }) - == elements.end()) { - return testing::AssertionFailure() << mappedElementVectorToString(elements); + for (auto name : names) { + if (std::find_if(elements.begin(), + elements.end(), + [&, name](const Data::MappedElement& element) { + return matchStringsWithoutClause(element.name.toString(), + name, + ";D[a-fA-F0-9]+"); + }) + == elements.end()) { + return testing::AssertionFailure() << mappedElementVectorToString(elements); + } } } return testing::AssertionSuccess(); diff --git a/tests/src/Mod/Part/App/TopoShapeExpansion.cpp b/tests/src/Mod/Part/App/TopoShapeExpansion.cpp index 01a0392f34..eae1983994 100644 --- a/tests/src/Mod/Part/App/TopoShapeExpansion.cpp +++ b/tests/src/Mod/Part/App/TopoShapeExpansion.cpp @@ -2444,13 +2444,11 @@ TEST_F(TopoShapeExpansionTest, replaceElementShape) EXPECT_TRUE(elementsMatch( result, { - "Edge1", "Edge1;:H1,E", "Edge1;:H2,E", "Edge1;:H3,E", "Edge2", - "Edge2;:H1,E", "Edge2;:H2,E", "Edge2;:H3,E", "Edge3", "Edge3;:H1,E", - "Edge3;:H2,E", "Edge3;:H3,E", "Edge4;:H1,E", "Edge4;:H2,E", "Edge4;:H3,E", - "Face1;:H2,F", "Face1;:H3,F", "Face1;:H4,F", "Face1;:H5,F", "Face1;:H6,F", - "Vertex1", "Vertex1;:H1,V", "Vertex1;:H2,V", "Vertex2", "Vertex2;:H1,V", - "Vertex2;:H2,V", "Vertex3", "Vertex3;:H1,V", "Vertex3;:H2,V", "Vertex4;:H1,V", - "Vertex4;:H2,V", + "Edge1;:H1,E", "Edge1;:H2,E", "Edge1;:H3,E", "Edge2;:H1,E", "Edge2;:H2,E", + "Edge2;:H3,E", "Edge3;:H1,E", "Edge3;:H2,E", "Edge3;:H3,E", "Edge4;:H1,E", + "Edge4;:H2,E", "Edge4;:H3,E", "Face1;:H2,F", "Face1;:H3,F", "Face1;:H4,F", + "Face1;:H5,F", "Face1;:H6,F", "Vertex1;:H1,V", "Vertex1;:H2,V", "Vertex2;:H1,V", + "Vertex2;:H2,V", "Vertex3;:H1,V", "Vertex3;:H2,V", "Vertex4;:H1,V", "Vertex4;:H2,V", })); }