diff --git a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp index 228a5df1a238..47e74f980bb0 100644 --- a/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp +++ b/tests/src/Mod/Part/App/TopoShapeMakeShapeWithElementMap.cpp @@ -255,10 +255,13 @@ void testFindSubShapesForSourceWithType(const TopoShape& source, testFindSubShapesForSourceWithTypeAndIndex(shapeTypeStr, elementStdMap, shapeIndex); } + QT_WARNING_PUSH + QT_WARNING_DISABLE_MSVC(4834) // Discarding a [[nodiscard]], which we are about to do... // ... we also check that we don't find shapes that don't exist and therefore don't // have either an IndexedName or a MappedName IndexedName fakeIndexedName {shapeTypeStr.c_str(), (int)source.countSubElements(shapeType) + 1}; EXPECT_THROW(elementStdMap.at(fakeIndexedName), std::out_of_range); + QT_WARNING_POP } void TopoShapeMakeShapeWithElementMapTests::testFindSourceSubShapesInElementMapForSource(