From: mpv Date: Mon, 17 Dec 2018 14:05:41 +0000 (+0300) Subject: Improve code coverage in PartSet plugin X-Git-Tag: End2018~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b6ebd6ceb90facbbf02af91198bec7ad3ca54f1f;p=modules%2Fshaper.git Improve code coverage in PartSet plugin --- diff --git a/src/PartSetPlugin/PartSetPlugin_Duplicate.h b/src/PartSetPlugin/PartSetPlugin_Duplicate.h index c85c01a02..ef320d8bd 100644 --- a/src/PartSetPlugin/PartSetPlugin_Duplicate.h +++ b/src/PartSetPlugin/PartSetPlugin_Duplicate.h @@ -38,12 +38,14 @@ class PartSetPlugin_Duplicate : public ModelAPI_Feature static const std::string MY_REMOVE_KIND("Duplicate"); return MY_REMOVE_KIND; } +//LCOV_EXCL_START /// Returns the kind of a feature PARTSETPLUGIN_EXPORT virtual const std::string& getKind() { static std::string MY_KIND = PartSetPlugin_Duplicate::ID(); return MY_KIND; } +//LCOV_EXCL_STOP /// Returns to which group in the document must be added feature PARTSETPLUGIN_EXPORT virtual const std::string& getGroup() @@ -53,9 +55,7 @@ class PartSetPlugin_Duplicate : public ModelAPI_Feature } /// Request for initialization of data model of the feature: adding all attributes - PARTSETPLUGIN_EXPORT virtual void initAttributes() - { - } + PARTSETPLUGIN_EXPORT virtual void initAttributes() {} /// Not normal feature that stored in the tree PARTSETPLUGIN_EXPORT virtual bool isAction() diff --git a/src/PartSetPlugin/PartSetPlugin_Part.cpp b/src/PartSetPlugin/PartSetPlugin_Part.cpp index 9b4c52589..06d4641b9 100644 --- a/src/PartSetPlugin/PartSetPlugin_Part.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Part.cpp @@ -120,10 +120,6 @@ bool PartSetPlugin_Part::isSub(ObjectPtr theObject) const return false; } -void PartSetPlugin_Part::removeFeature(std::shared_ptr theFeature) -{ -} - void PartSetPlugin_Part::erase() { ResultPartPtr aResult = std::dynamic_pointer_cast(firstResult()); if (aResult.get()) { diff --git a/src/PartSetPlugin/PartSetPlugin_Part.h b/src/PartSetPlugin/PartSetPlugin_Part.h index 8a79e0d88..8abf2dca1 100644 --- a/src/PartSetPlugin/PartSetPlugin_Part.h +++ b/src/PartSetPlugin/PartSetPlugin_Part.h @@ -45,12 +45,14 @@ class PartSetPlugin_Part : public ModelAPI_CompositeFeature return MY_KIND; } +//LCOV_EXCL_START /// Returns to which group in the document must be added feature PARTSETPLUGIN_EXPORT virtual const std::string& getGroup() { static std::string MY_GROUP = "Parts"; return MY_GROUP; } +//LCOV_EXCL_STOP /// Creates a new part document if needed PARTSETPLUGIN_EXPORT virtual void execute(); @@ -80,7 +82,7 @@ class PartSetPlugin_Part : public ModelAPI_CompositeFeature /// This method to inform that sub-feature is removed and must be removed from the internal data /// structures of the owner (the remove from the document will be done outside just after) - virtual void removeFeature(std::shared_ptr theFeature); + virtual void removeFeature(std::shared_ptr theFeature) {} /// Use plugin manager for features creation PartSetPlugin_Part(); diff --git a/src/PartSetPlugin/PartSetPlugin_Remove.h b/src/PartSetPlugin/PartSetPlugin_Remove.h index f24d30e2f..58fc7ffa2 100644 --- a/src/PartSetPlugin/PartSetPlugin_Remove.h +++ b/src/PartSetPlugin/PartSetPlugin_Remove.h @@ -37,6 +37,7 @@ class PartSetPlugin_Remove : public ModelAPI_Feature static const std::string MY_REMOVE_KIND("Remove"); return MY_REMOVE_KIND; } +//LCOV_EXCL_START /// Returns the kind of a feature PARTSETPLUGIN_EXPORT virtual const std::string& getKind() { @@ -55,6 +56,7 @@ class PartSetPlugin_Remove : public ModelAPI_Feature PARTSETPLUGIN_EXPORT virtual void initAttributes() { } +//LCOV_EXCL_STOP /// Not normal feature that stored in the tree PARTSETPLUGIN_EXPORT virtual bool isAction()