From: mpv Date: Wed, 12 Dec 2018 17:09:01 +0000 (+0300) Subject: Improve coverage for Model and Config packages X-Git-Tag: End2018~70 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=31edf016c396284daaf418095e2a8d908c945b6a;p=modules%2Fshaper.git Improve coverage for Model and Config packages --- diff --git a/src/Config/Config_DataModelReader.cpp b/src/Config/Config_DataModelReader.cpp index 0fa959f8f..68e6f6dcd 100644 --- a/src/Config/Config_DataModelReader.cpp +++ b/src/Config/Config_DataModelReader.cpp @@ -24,7 +24,8 @@ #include - +// used only for GUI xml data reading +// LCOV_EXCL_START Config_DataModelReader::Config_DataModelReader() : Config_XMLReader(DATAMODEL_FILE), isRootReading(true), myIsResultLink(false) { @@ -132,4 +133,4 @@ std::string Config_DataModelReader:: { return getFolderFeatures(theFolderName, myRootFolderNames, myRootFeaturesList); } - +// LCOV_EXCL_STOP diff --git a/src/Config/Config_Translator.cpp b/src/Config/Config_Translator.cpp index f215213e1..ff9d50ec1 100644 --- a/src/Config/Config_Translator.cpp +++ b/src/Config/Config_Translator.cpp @@ -77,7 +77,6 @@ void Config_TSReader::processNode(xmlNodePtr theNode) myTranslator[aName][aSource] = aTranslat; } } -// LCOV_EXCL_STOP //****************************************************************************** //****************************************************************************** @@ -120,6 +119,7 @@ bool Config_Translator::load(const std::string& theFileName) } return true; } +// LCOV_EXCL_STOP std::string Config_Translator::translate(const Events_InfoMessage& theInfo) { @@ -176,7 +176,7 @@ std::string Config_Translator::translate(const std::string& theContext, return aMsg; } - +// LCOV_EXCL_START std::string Config_Translator::codec(const std::string& theContext) { return (myCodecs.count(theContext) > 0)? myCodecs[theContext] : "UTF-8"; @@ -186,6 +186,7 @@ std::string Config_Translator::codec(const Events_InfoMessage& theInfo) { return codec(theInfo.context()); } +// LCOV_EXCL_STOP #ifdef _DEBUG #ifdef MISSED_TRANSLATION diff --git a/src/Model/Model_AttributeRefList.cpp b/src/Model/Model_AttributeRefList.cpp index 4dca9ad93..7ffe0c4d3 100644 --- a/src/Model/Model_AttributeRefList.cpp +++ b/src/Model/Model_AttributeRefList.cpp @@ -67,6 +67,7 @@ void Model_AttributeRefList::remove(ObjectPtr theObject) REMOVE_BACK_REF(theObject); owner()->data()->sendAttributeUpdated(this); } else { + // LCOV_EXCL_START // create new lists because for the current moment remove one of the duplicated elements // from the list is buggy TDF_LabelList anOldList = myRef->List(); @@ -102,6 +103,7 @@ void Model_AttributeRefList::remove(ObjectPtr theObject) REMOVE_BACK_REF(theObject); owner()->data()->sendAttributeUpdated(this); } + // LCOV_EXCL_STOP } } else { // in case of empty object remove, the first empty object is removed from the list diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 617007a5e..b813dcd18 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -269,6 +269,8 @@ int Model_AttributeSelectionList::size() return mySize->Get(); } +// LCOV_EXCL_START + // returns true if theShape is same with theInList or is contained in it (a compound) static bool isIn(GeomShapePtr theInList, GeomShapePtr theShape) { if (theShape->isSame(theInList)) @@ -328,6 +330,7 @@ bool Model_AttributeSelectionList::isInList(const ObjectPtr& theContext, } return false; } +// LCOV_EXCL_STOP const std::string Model_AttributeSelectionList::selectionType() const { @@ -407,7 +410,7 @@ void Model_AttributeSelectionList::reinit() myIsCashed = false; } - +// LCOV_EXCL_START void Model_AttributeSelectionList::cashValues(const bool theEnabled) { myIsCashed = theEnabled; @@ -421,6 +424,7 @@ void Model_AttributeSelectionList::cashValues(const bool theEnabled) } } } +// LCOV_EXCL_STOP bool Model_AttributeSelectionList::isGeometricalSelection() const {