winIDEA SDK
isys::CTestCoverageStatistics Class Reference

Description

This class contains coverage requirements.

If function name is not specified, function under test is assumed. This is serializable version of CCoverageStatistics2. This class is aggregated by CTestAnalyzerCoverage (values are specified in percentage) and CTestCoverageResult. All results are set and returned in percentage, which means in range [0%..100%].

#include <CTestCoverageStatistics.h>

Inheritance diagram for isys::CTestCoverageStatistics:
isys::CTestBase

Public Types

enum  ECoverageStatSectionId
 Ids of test specification sections.
 

Public Member Functions

std::string getFunctionName ()
 Returns function name.
 
float getSourceLinesExecuted ()
 Returns the ratio of source lines to be executed in %.
 
float getBytesExecuted ()
 Returns the ratio of bytes to be executed in %.
 
float getBranchExecuted ()
 Returns the ratio of branches to be executed in %.
 
float getBranchTaken ()
 Returns the ratio of branches to be taken in %.
 
float getBranchNotTaken ()
 Returns the ratio of branches not to be taken in %.
 
float getBranchBoth ()
 Returns the ratio of branches to be executed both ways in %.
 
int64_t getExecutionCount ()
 Returns how may times the item was executed.
 
std::string getBytesExecutedText ()
 Returns true if MC/DC coverage is required.
 
void setFunctionName (const std::string &functionName)
 Sets the name of the function to be covered.
 
void setCodeExecuted (const std::string &codeExecuted)
 Sets the amount of code executed in %.
 
void setSourceLinesExecuted (const std::string &codeExecuted)
 Sets the amount of source lines executed in %.
 
void setBranchExecuted (const std::string &branchExecuted)
 Sets the number of branches executed in %.
 
void setBranchTaken (const std::string &branchTaken)
 Sets the number of branches taken in %.
 
void setBranchNotTaken (const std::string &branchNotTaken)
 Sets the number of branches not taken in %.
 
void setBranchBoth (const std::string &branchBoth)
 Sets the number of branches taken both ways in %.
 
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
 
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
 
virtual std::string toString ()
 Returns object data as YAML string.
 

Static Public Member Functions

static CTestCoverageStatisticsSPtr cast (const CTestBaseSPtr &testBase)
 Casts the given object to this class. More...
 

Protected Member Functions

void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...
 

Member Function Documentation

◆ cast()

static CTestCoverageStatisticsSPtr isys::CTestCoverageStatistics::cast ( const CTestBaseSPtr testBase)
static

Casts the given object to this class.

Returns NULL if input is NULL.

Exceptions
IllegalArgumentExceptionif input object is not instance of this class.