#include <CTestCoverage.h>
Public Types | |
| enum | EAnalyzerSectionId |
| Ids of test specification sections. | |
| enum | ERunMode { M_OFF , M_START , M_RESUME } |
| Trace modes. More... | |
Public Member Functions | |
| isys::CTestCoverageStatisticsSPtr | addStatistics () |
| Adds empty statistics object at the end of the list. | |
| virtual void | assign (const CTestObjectSPtr &base) |
| Assigns members of base to this. | |
| void | assignStatistics (const isys::CTestCoverageCSPtr &src) |
| This method copies statistics data from the object given as parameter to this object. | |
| bool | containsSection (int section) const |
| Returns true, if the specified section exists for this object. | |
| virtual CTestObjectSPtr | copy () const |
| Creates a deep copy of this object. | |
| CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const |
| Creates new empty instance of this class. | |
| CTestCoverage () | |
| Initializes new instance with NULL parent. | |
| CTestCoverage (const isys::CTestBaseSPtr &parent) | |
| Initializes new instance. | |
| int | findStatistic (const std::string &functionName) |
| Returns index of statistics for the given function, or -1 if no such function exists. | |
| std::string | getClassName () const |
| virtual CTestTreeNodeSPtr | getContainerTestNode () |
| virtual CTestSpecificationSPtr getContainerTestSpec(); | |
| std::string | getDocumentFileName () |
| Returns name of the document to contain trace results. | |
| int | getEnumTagValue (int section) |
| Returns value of enum type. | |
| std::string | getExportFileName () |
| Returns the export file name. | |
| std::string | getExportFormat () |
| Returns the export format type. | |
| std::string | getExportFormatVariant () |
| Returns the export format variant. | |
| std::string | getExportFunctionsFilter () |
| Returns filter for functions export. | |
| std::string | getExportModulesFilter () |
| Returns filter for modules export. | |
| std::string | getOpenMode () |
| Returns one of the open mode strings: "r", "w", or "a". | |
| CTestBaseSPtr | getParent () const |
| Returns parent. | |
| ERunMode | getRunMode () |
| Returns run mode. | |
| int | getSectionId (const std::string §ionName) |
| Returns section ID for the given section name. | |
| isys::CTestCoverageStatisticsSPtr | getStatistics (int idx) |
| Returns the requested statistics. | |
| size_t | getStatisticsSize () |
| Returns vector of coverage statistic items. | |
| CTestBaseSPtr | getTestBase (int section, bool isConst) |
| CTestBaseListSPtr | getTestBaseList (int section, bool isConst) |
| CTestObject::ETestObjType | getTestObjType () const |
| Returns type of this object, which is CTestObject::ETestBase. | |
| std::string | getTriggerName () |
| Returns the name of the trigger to be used for trace start. | |
| void | insertStatistics (isys::CTestCoverageStatisticsSPtr &stats, int idx) |
| Adds empty statistics object at the end of the list. | |
| iconnect::ETristate | isCloseAfterTest () |
| Returns true, if the document should be closed after test. | |
| virtual bool | isEmpty () const |
| This method returns true, if the object contains no data. | |
| iconnect::ETristate | isExportAsm () |
| Returns true, if assembler coverage should be exported. | |
| iconnect::ETristate | isExportFunctionLines () |
| Returns true, if function lines coverage should be exported. | |
| iconnect::ETristate | isExportModuleLines () |
| Returns true, if module lines coverage should be exported. | |
| iconnect::ETristate | isExportRanges () |
| Returns true, if ranges coverage should be exported. | |
| iconnect::ETristate | isExportSources () |
| Returns true, if source files coverage should be exported. | |
| iconnect::ETristate | isLaunchViewer () |
| Returns true, if viewer should be launched after coverage. | |
| bool | isMerged () const |
| Returns true, if the CTestSpecification section containing this object is merged. | |
| iconnect::ETristate | isProvideAssemblerInfo () |
| Returns ETrue, if assembly level coverage should be performed. | |
| bool | isRecordingConfigEmpty () |
| Returns true, if only coverage recoding configuration is empty, that means everything except statistics is empty. | |
| iconnect::ETristate | isSaveAfterTest () |
| Returns true, if the document should be saved after test. | |
| bool | isSectionEmpty (int sectionId) |
| Returns true, if the given section is empty. | |
| virtual bool | isSerializedAsList (bool isParsing) |
| Returns true if object should be serialized as list, for example CTestFunction. | |
| iconnect::ETristate | isSlowRun () |
| Returns E_TRUE, if slow run should be used for analyzer. | |
| void | removeStatistics (int idx) |
| Removes statistics at the given index. | |
| virtual void | serialize (const isys::IEmitterSPtr &emitter) |
| Sends contents of this class to emitter. | |
| void | setAssemblyInfo (iconnect::ETristate isAssemblyInfo) |
| Sets whether assembly information should be provided with coverage. | |
| void | setCloseAfterTest (iconnect::ETristate isClose) |
| Sets close operation for trace document after test. | |
| virtual void | setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment) |
| void | setDocumentFileName (const std::string &docFileName) |
| Sets the name of the trace document. | |
| void | setEnumTagValue (int section, int enumValue) |
| Sets value of enum type. | |
| void | setExportAsm (iconnect::ETristate isExportAsm) |
| Sets whether assembler coverage should be exported. | |
| void | setExportFileName (const std::string &exportFileName) |
| Sets the export file name. | |
| void | setExportFormat (const std::string &exportFormat) |
| Sets export format for the trace document. | |
| void | setExportFormatVariant (const std::string &variant) |
| Sets format variant of the export format. | |
| void | setExportFunctionLines (iconnect::ETristate isExportFunctionLines) |
| Sets whether function lines coverage should be exported. | |
| void | setExportFunctionsFilter (const std::string &filter) |
| Sets filter for functions export. | |
| void | setExportModuleLines (iconnect::ETristate isExportModuleLines) |
| Sets whether module lines coverage should be exported. | |
| void | setExportModulesFilter (const std::string &filter) |
| Sets filter for modules export. | |
| void | setExportRanges (iconnect::ETristate isExportRanges) |
| Sets whether ranges coverage should be exported. | |
| void | setExportSources (iconnect::ETristate isExportSources) |
| Sets whether source files coverage should be exported. | |
| void | setLaunchViewer (iconnect::ETristate isLaunchViewer) |
| Sets whether viewer should be launched after coverage. | |
| virtual void | setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle) |
| Sets style of the mapping for complete object. | |
| void | setOpenMode (const std::string &openMode) |
| Sets open mode for document. | |
| void | setParent (CTestBaseSPtr parent) |
| Sets parent. | |
| void | setRunMode (ERunMode mode) |
| Sets run mode. | |
| void | setSaveAfterTest (iconnect::ETristate isSave) |
| Sets save operation for trace document after test. | |
| void | setSlowRun (iconnect::ETristate isSlowRun) |
If parameter is true, then slow run is used for analyzer. | |
| void | setTriggerName (const std::string &triggerName) |
| Sets name of the trigger to be used for trace start. | |
| void | swapStatistics (int idx1, int idx2) |
| Swaps two statistics in the list. | |
| virtual std::string | toString () |
| Returns object data as YAML string. | |
Static Public Member Functions | |
| static CTestCoverageSPtr | cast (CTestBaseSPtr &testBase) |
| Casts testBase to this class. | |
Protected Member Functions | |
| void | setStaticTagsAsConst () |
| This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ... | |
This class contains specification for coverage recording during test execution.
|
inherited |
Trace modes.
| Enumerator | |
|---|---|
| M_OFF | trace will not be configured or started |
| M_START | start trace |
| M_RESUME | Deprecated: use open mode Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document. |
| isys::CTestCoverage::CTestCoverage | ( | ) |
Initializes new instance with NULL parent.
| isys::CTestCoverage::CTestCoverage | ( | const isys::CTestBaseSPtr & | parent | ) |
Initializes new instance.
| parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
| isys::CTestCoverageStatisticsSPtr isys::CTestCoverage::addStatistics | ( | ) |
Adds empty statistics object at the end of the list.
|
virtualinherited |
| void isys::CTestCoverage::assignStatistics | ( | const isys::CTestCoverageCSPtr & | src | ) |
This method copies statistics data from the object given as parameter to this object.
|
static |
Casts testBase to this class.
| IllegalArgumentException | if cast fails. |
|
inherited |
Returns true, if the specified section exists for this object.
|
virtualinherited |
Creates a deep copy of this object.
Parent is set.
|
virtual |
Creates new empty instance of this class.
Can be used when we only have pointer to base but want to get instance of derived class.
Reimplemented from isys::CTestTrace.
| int isys::CTestCoverage::findStatistic | ( | const std::string & | functionName | ) |
Returns index of statistics for the given function, or -1 if no such function exists.
|
inherited |
|
virtualinherited |
virtual CTestSpecificationSPtr getContainerTestSpec();
|
inherited |
Returns name of the document to contain trace results.
|
inherited |
Returns value of enum type.
|
inherited |
Returns the export file name.
|
inherited |
| std::string isys::CTestCoverage::getExportFormatVariant | ( | ) |
Returns the export format variant.
Empty string means the 'default' variant.
| std::string isys::CTestCoverage::getExportFunctionsFilter | ( | ) |
Returns filter for functions export.
| std::string isys::CTestCoverage::getExportModulesFilter | ( | ) |
Returns filter for modules export.
|
inherited |
Returns one of the open mode strings: "r", "w", or "a".
|
inherited |
Returns parent.
|
inherited |
Returns run mode.
|
inherited |
Returns section ID for the given section name.
| isys::CTestCoverageStatisticsSPtr isys::CTestCoverage::getStatistics | ( | int | idx | ) |
Returns the requested statistics.
IMPORTANT: Pointer to object allocated by native code is returned. To avoid crashes, it is strongly recommended to copy data from this object to wrapping language object immediately after this call and then no longer use this pointer. Otherwise it may happen that parent test specification goes out of scoe and is garbage colected, while your application may still use this pointer, which is no longer valid.
| size_t isys::CTestCoverage::getStatisticsSize | ( | ) |
Returns vector of coverage statistic items.
Not accessible from other languages than C++. Returns the number of coverage statistic items.
|
inherited |
|
inherited |
|
inherited |
Returns type of this object, which is CTestObject::ETestBase.
|
inherited |
Returns the name of the trigger to be used for trace start.
The trigger should be defined in winIDEA GUI.
| void isys::CTestCoverage::insertStatistics | ( | isys::CTestCoverageStatisticsSPtr & | stats, |
| int | idx ) |
Adds empty statistics object at the end of the list.
|
inherited |
Returns true, if the document should be closed after test.
|
virtualinherited |
This method returns true, if the object contains no data.
| iconnect::ETristate isys::CTestCoverage::isExportAsm | ( | ) |
Returns true, if assembler coverage should be exported.
| iconnect::ETristate isys::CTestCoverage::isExportFunctionLines | ( | ) |
Returns true, if function lines coverage should be exported.
| iconnect::ETristate isys::CTestCoverage::isExportModuleLines | ( | ) |
Returns true, if module lines coverage should be exported.
| iconnect::ETristate isys::CTestCoverage::isExportRanges | ( | ) |
Returns true, if ranges coverage should be exported.
| iconnect::ETristate isys::CTestCoverage::isExportSources | ( | ) |
Returns true, if source files coverage should be exported.
| iconnect::ETristate isys::CTestCoverage::isLaunchViewer | ( | ) |
Returns true, if viewer should be launched after coverage.
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestTrace.
| iconnect::ETristate isys::CTestCoverage::isProvideAssemblerInfo | ( | ) |
Returns ETrue, if assembly level coverage should be performed.
EDefault means that assembly level coverage will not be performed.
| bool isys::CTestCoverage::isRecordingConfigEmpty | ( | ) |
Returns true, if only coverage recoding configuration is empty, that means everything except statistics is empty.
|
inherited |
Returns true, if the document should be saved after test.
|
inherited |
Returns true, if the given section is empty.
|
virtualinherited |
Returns true if object should be serialized as list, for example CTestFunction.
Reimplemented in isys::CTestFunction.
|
inherited |
Returns E_TRUE, if slow run should be used for analyzer.
| void isys::CTestCoverage::removeStatistics | ( | int | idx | ) |
Removes statistics at the given index.
|
virtualinherited |
Sends contents of this class to emitter.
Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.
| void isys::CTestCoverage::setAssemblyInfo | ( | iconnect::ETristate | isAssemblyInfo | ) |
Sets whether assembly information should be provided with coverage.
| isAssemblyInfo | if EDefault assembly information will not be provided with coverage. |
|
inherited |
Sets close operation for trace document after test.
|
virtualinherited |
|
inherited |
Sets the name of the trace document.
|
inherited |
Sets value of enum type.
| void isys::CTestCoverage::setExportAsm | ( | iconnect::ETristate | isExportAsm | ) |
Sets whether assembler coverage should be exported.
|
inherited |
Sets the export file name.
|
inherited |
Sets export format for the trace document.
See CAnalyzerDocController for possible values.
| void isys::CTestCoverage::setExportFormatVariant | ( | const std::string & | variant | ) |
Sets format variant of the export format.
| void isys::CTestCoverage::setExportFunctionLines | ( | iconnect::ETristate | isExportFunctionLines | ) |
Sets whether function lines coverage should be exported.
| void isys::CTestCoverage::setExportFunctionsFilter | ( | const std::string & | filter | ) |
Sets filter for functions export.
| void isys::CTestCoverage::setExportModuleLines | ( | iconnect::ETristate | isExportModuleLines | ) |
Sets whether module lines coverage should be exported.
| void isys::CTestCoverage::setExportModulesFilter | ( | const std::string & | filter | ) |
Sets filter for modules export.
| void isys::CTestCoverage::setExportRanges | ( | iconnect::ETristate | isExportRanges | ) |
Sets whether ranges coverage should be exported.
| void isys::CTestCoverage::setExportSources | ( | iconnect::ETristate | isExportSources | ) |
Sets whether source files coverage should be exported.
| void isys::CTestCoverage::setLaunchViewer | ( | iconnect::ETristate | isLaunchViewer | ) |
Sets whether viewer should be launched after coverage.
|
virtualinherited |
Sets style of the mapping for complete object.
|
inherited |
Sets open mode for document.
| openMode | can be one of:
|
|
inherited |
Sets parent.
|
inherited |
Sets run mode.
|
inherited |
Sets save operation for trace document after test.
|
inherited |
If parameter is true, then slow run is used for analyzer.
|
inherited |
Sets name of the trigger to be used for trace start.
The trigger must be defined in winIDEA GUI.
| void isys::CTestCoverage::swapStatistics | ( | int | idx1, |
| int | idx2 ) |
Swaps two statistics in the list.
|
virtualinherited |
Returns object data as YAML string.