diff --git a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp index b5910c5145..228a5df1a2 100644 --- a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp +++ b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp @@ -233,14 +233,14 @@ void testFindSubShapesForSourceWithTypeAndIndex(const std::string& shapeTypeStr, MappedName mappedName {elementStdMap[indexedName]}; const char shapeTypePrefix {indexedName.toString()[0]}; -#pragma warning(push) -#pragma warning(disable : 4834) // Discarding a [[nodiscard]], which we are about to do... - EXPECT_NO_THROW(elementStdMap.at(indexedName)); // We check that the IndexedName - // is one of the keys... - EXPECT_NE(mappedName.find(shapeName.c_str()), - -1); // ... that the element name is in the MappedName... + QT_WARNING_PUSH + QT_WARNING_DISABLE_MSVC(4834) // Discarding a [[nodiscard]], which we are about to do... + // We check that the IndexedName is one of the keys... + EXPECT_NO_THROW(elementStdMap.at(indexedName)); + // ... that the element name is in the MappedName... + EXPECT_NE(mappedName.find(shapeName.c_str()), -1); EXPECT_EQ(mappedName.toString().back(), shapeTypePrefix); -#pragma warning(pop) + QT_WARNING_POP } void testFindSubShapesForSourceWithType(const TopoShape& source,