winIDEA SDK
Loading...
Searching...
No Matches
isys::CLogResult Class Reference

This class stores results of log section. More...

#include <CTestResult.h>

Inheritance diagram for isys::CLogResult:
isys::CTestBase

Public Types

enum  ETestResultSections { E_SECTION_BEFORE_ASSIGN , E_SECTION_AFTER_ASSIGN }
 Ids of test result sections. More...

Public Member Functions

void add (const std::string &expr, const std::string &result, ETestResultSections logType)
 Add result of expression evaluation.
virtual void assign (const CTestObjectSPtr &base)
 Assigns members of base to this.
 CLogResult (const CTestBaseSPtr &parent)
 Initializes new instance.
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
std::string getClassName () const
virtual CTestTreeNodeSPtr getContainerTestNode ()
 virtual CTestSpecificationSPtr getContainerTestSpec();
int getEnumTagValue (int section)
 Returns value of enum type.
void getLog (iconnect::StrVector &expressions, iconnect::StrVector &results, ETestResultSections logType)
 Returns expressions and their evaluated values.
CTestBaseSPtr getParent () const
 Returns parent.
int getSectionId (const std::string &sectionName)
 Returns section ID for the given section name.
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.
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
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.
virtual void serialize (const isys::IEmitterSPtr &emitter)
 configures expr.
virtual void setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment)
void setEnumTagValue (int section, int enumValue)
 Sets value of enum type.
virtual void setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle)
 Sets style of the mapping for complete object.
void setParent (CTestBaseSPtr parent)
 Sets parent.
virtual std::string toString ()
 Returns object data as YAML string.

Static Public Member Functions

static CLogResultSPtr cast (const CTestBaseSPtr &testBase)
 Casts the given object 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, ...

Detailed Description

This class stores results of log section.

These values are not used for validating test, but for documentation purposes.

Member Enumeration Documentation

◆ ETestResultSections

Ids of test result sections.

Assignments are made when stub or test point is hit.

Enumerator
E_SECTION_BEFORE_ASSIGN 

expression was evaluated before assignment was made

E_SECTION_AFTER_ASSIGN 

expression was evaluated after assignment was made

Constructor & Destructor Documentation

◆ CLogResult()

isys::CLogResult::CLogResult ( const CTestBaseSPtr & parent)

Initializes new instance.

Parameters
parentan instance of parent CTestPoint class.
Since
9.12.288

Member Function Documentation

◆ add()

void isys::CLogResult::add ( const std::string & expr,
const std::string & result,
ETestResultSections logType )

Add result of expression evaluation.

Results should be added in the same order as expressions are specified in test spec.

Since
9.12.288

◆ assign()

virtual void isys::CTestBase::assign ( const CTestObjectSPtr & base)
virtualinherited

Assigns members of base to this.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ cast()

CLogResultSPtr isys::CLogResult::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.

◆ containsSection()

bool isys::CTestBase::containsSection ( int section) const
inherited

Returns true, if the specified section exists for this object.

Since
9.12.288

◆ copy()

virtual CTestObjectSPtr isys::CTestBase::copy ( ) const
virtualinherited

Creates a deep copy of this object.

Parent is set.

Since
9.12.288

◆ createInstance()

CTestBaseSPtr isys::CLogResult::createInstance ( const CTestBaseSPtr & parent) const
virtual
Since
9.12.288

Implements isys::CTestBase.

◆ getClassName()

std::string isys::CTestBase::getClassName ( ) const
inherited
Since
9.12.288

◆ getContainerTestNode()

virtual CTestTreeNodeSPtr isys::CTestBase::getContainerTestNode ( )
virtualinherited

virtual CTestSpecificationSPtr getContainerTestSpec();

Since
9.12.288

◆ getEnumTagValue()

int isys::CTestBase::getEnumTagValue ( int section)
inherited

Returns value of enum type.

Since
9.12.288

◆ getLog()

void isys::CLogResult::getLog ( iconnect::StrVector & expressions,
iconnect::StrVector & results,
ETestResultSections logType )

Returns expressions and their evaluated values.

Sizes of both vectors are the same after return.

Since
9.12.288

◆ getParent()

CTestBaseSPtr isys::CTestBase::getParent ( ) const
inherited

Returns parent.

Since
9.12.288

◆ getSectionId()

int isys::CTestBase::getSectionId ( const std::string & sectionName)
inherited

Returns section ID for the given section name.

Since
9.12.288

◆ getTestBase()

CTestBaseSPtr isys::CTestBase::getTestBase ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestBaseList()

CTestBaseListSPtr isys::CTestBase::getTestBaseList ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestObjType()

CTestObject::ETestObjType isys::CTestBase::getTestObjType ( ) const
inherited

Returns type of this object, which is CTestObject::ETestBase.

Since
9.12.288

◆ isEmpty()

virtual bool isys::CTestBase::isEmpty ( ) const
virtualinherited

This method returns true, if the object contains no data.

Since
9.12.288

◆ isSectionEmpty()

bool isys::CTestBase::isSectionEmpty ( int sectionId)
inherited

Returns true, if the given section is empty.

Since
9.12.288

◆ isSerializedAsList()

virtual bool isys::CTestBase::isSerializedAsList ( bool isParsing)
virtualinherited

Returns true if object should be serialized as list, for example CTestFunction.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ serialize()

virtual void isys::CLogResult::serialize ( const isys::IEmitterSPtr & emitter)
virtual

configures expr.

map to contain arbitrary values as keys

Since
9.12.288

Reimplemented from isys::CTestBase.

◆ setComment()

virtual void isys::CTestBase::setComment ( int section,
int idx,
const std::string & nlComment,
const std::string & eolComment )
virtualinherited
Since
9.12.288

◆ setEnumTagValue()

void isys::CTestBase::setEnumTagValue ( int section,
int enumValue )
inherited

Sets value of enum type.

Since
9.12.288

◆ setMainMapStyle()

virtual void isys::CTestBase::setMainMapStyle ( isys::IEmitter::EYamlStyle mappingStyle)
virtualinherited

Sets style of the mapping for complete object.

Since
9.12.288

◆ setParent()

void isys::CTestBase::setParent ( CTestBaseSPtr parent)
inherited

Sets parent.

Since
9.12.288

◆ toString()

virtual std::string isys::CTestBase::toString ( )
virtualinherited

Returns object data as YAML string.

Since
9.12.288