winIDEA SDK
isys::CLogResult Class Reference

Description

This class stores results of log section.

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

#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

 CLogResult (const CTestBaseSPtr &parent)
 Initializes new instance. More...
 
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
 
void add (const std::string &expr, const std::string &result, ETestResultSections logType)
 Add result of expression evaluation. More...
 
void getLog (iconnect::StrVector &expressions, iconnect::StrVector &results, ETestResultSections logType)
 Returns expressions and their evaluated values. More...
 
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
 
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. More...
 

Protected Member Functions

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

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.

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.

◆ cast()

static 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.

◆ 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.