From f93af5dee43127b08a43a0d93e5ca6afbdc1997d Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 11 Apr 2019 13:31:22 +0300 Subject: [PATCH] Improve the code coverage level --- src/BuildPlugin/BuildPlugin_Validators.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/BuildPlugin/BuildPlugin_Validators.cpp b/src/BuildPlugin/BuildPlugin_Validators.cpp index 4c7c8a4fc..45d859844 100644 --- a/src/BuildPlugin/BuildPlugin_Validators.cpp +++ b/src/BuildPlugin/BuildPlugin_Validators.cpp @@ -343,20 +343,24 @@ bool BuildPlugin_ValidatorSubShapesSelection::isValid(const AttributePtr& theAtt Events_InfoMessage& theError) const { if(theArguments.size() != 1) { + // LCOV_EXCL_START std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection should be used only with " "1 parameter(Sketch feature id)."; Events_InfoMessage("BuildPlugin_Validators", aMsg).send(); return false; + // LCOV_EXCL_STOP } // Get base objects list. if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) { + // LCOV_EXCL_START std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \"" "%1\"\n Only \"%2\" supported."; Events_InfoMessage("BuildPlugin_Validators", aMsg). arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send(); return false; + // LCOV_EXCL_STOP } AttributeSelectionListPtr aSelectionList = std::dynamic_pointer_cast(theAttribute); @@ -444,12 +448,14 @@ bool BuildPlugin_ValidatorFillingSelection::isValid(const AttributePtr& theAttri { // Get base objects list. if (theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) { + // LCOV_EXCL_START std::string aMsg = "Error: BuildPlugin_ValidatorFillingSelection does not support attribute type \"" "%1\"\n Only \"%2\" supported."; Events_InfoMessage("BuildPlugin_Validators", aMsg). arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send(); return false; + // LCOV_EXCL_STOP } AttributeSelectionListPtr aSelectionList = std::dynamic_pointer_cast(theAttribute); -- 2.39.2