This class can be used to store arbitrary information as key-value pairs. More...
#include <CTestResult.h>
Public Types | |
| enum | ProfilerErrCode { ERR_NONE , ERR_MIN , ERR_MAX , ERR_BOTH } |
| Profiler result error codes. More... | |
Public Member Functions | |
| CTestProfilerStatisticsSPtr | getExpectedResult () |
| Returns constraints as specified in test specification. | |
| std::string | getMeasuredHits () |
| Returns the number of hits as string. | |
| CProfilerStatistics2 | getMeasuredResult () const |
| Returns measured data, but only if isResultSet() returns true. | |
| std::string | getMeasuredTime (CTestProfilerStatistics::EProfilerStatisticsSectionId statsId, CTestProfilerTime::EProfilerTimeSectionId timeId) |
| Returns the number of hits as string. | |
| std::string | getValue () const |
| Returns min time as specified in test specification. | |
| bool | isError () |
| Returns true, if any error occurred. | |
| bool | isResultSet () const |
| Returns true, if result was set for this area. | |
| bool | isValueSet () const |
| Returns true, if data value in the test specification was set. | |
| void | serialize (const isys::IEmitterSPtr &emitter) |
| Writes object data to destination object. | |
| void | serializeErrorsOnly (const isys::IEmitterSPtr &emitter) |
| Writes object error data to destination object. | |
| ProfilerErrCode | validateAllTimes (ProfilerErrCode prevError) |
| Returns error status for all time measurements. | |
| ProfilerErrCode | validateError (CTestProfilerStatistics::EProfilerStatisticsSectionId statsId, CTestProfilerTime::EProfilerTimeSectionId timeId) |
| Returns error status for the given time scope and time type. | |
| ProfilerErrCode | validateHits () |
| Checks for hits error. | |
| ProfilerErrCode | validateTimeScopeForAllTimeTypes (CTestProfilerStatistics::EProfilerStatisticsSectionId statsId) |
| Returns error status for the given time scope for all time types. | |
| ProfilerErrCode | validateTimeTypeForAllScopes (CTestProfilerTime::EProfilerTimeSectionId timeTypeId) |
| Returns error status for the given time type for all time scopes. | |
This class can be used to store arbitrary information as key-value pairs.
The order is preserved, which means that items are serialized in the same order as they are put into the container. If strings contain characters, which have special meaning in the output format, they have to be escaped or the appropriate add...() method used. Keys should contain alphanumeric characters and underscore '_' only.
Removed, because this info was added to CTestReportConfig as userInfo of type CYAMLMap. This way serialization.deserialization to/from YAML was more consistent.
class CSerializableInfo : public ISerializable { private: class StrStrPair { public: std::string m_key; std::string m_value;
StrStrPair(const std::string &key, const std::string &value) : m_key(key), m_value(value) {} };
std::vector<StrStrPair> m_infoVector;
public:
/ Default ctor. Do not use it from other languages than C++. Call createInstance()
instead./
CSerializableInfo() {}
/ Adds key / value pair without any modifications. /
void add(const std::string &key, const std::string &value);
/ Writes object's data to report!. /
void serialize(isys::IEmitterSPtr &emitter) const;
/ This method converts pointer to derived class to base class. It is required
for scripting languages, which can not perform such conversion automatically. /
isys::ISerializableSPtr upcast(const isys::CSerializableInfoSPtr &ptr);
/ Create a new instance of this class. /
static isys::CSerializableInfoSPtr createInstance();
}; This class contains expected results of coverage test. All values are in range [0..1], where 1 means 100%. Shared pointer for CCoverageTestResult. This class stores result of profiler test. This class is not intended to be instantiated by clients. Call isys::CTestCase::getTestResults() or similar method in the scripting language wrapper to get test results.
| CTestProfilerStatisticsSPtr isys::CProfilerTestResult::getExpectedResult | ( | ) |
Returns constraints as specified in test specification.
| std::string isys::CProfilerTestResult::getMeasuredHits | ( | ) |
Returns the number of hits as string.
If this is data area with multiple measurements (for multiple states), then string 'min / max' is returned.
| CProfilerStatistics2 isys::CProfilerTestResult::getMeasuredResult | ( | ) | const |
Returns measured data, but only if isResultSet() returns true.
| std::string isys::CProfilerTestResult::getMeasuredTime | ( | CTestProfilerStatistics::EProfilerStatisticsSectionId | statsId, |
| CTestProfilerTime::EProfilerTimeSectionId | timeId ) |
Returns the number of hits as string.
If this is data area with multiple measurements (for multiple states), then string 'min / max' is returned.
| std::string isys::CProfilerTestResult::getValue | ( | ) | const |
Returns min time as specified in test specification.
Returns max time as specified in test specification. Returns total time as specified in test specification. Returns hits as specified in test specification. Returns value for this result. The value is valid only when isValueSet() returns true.
| bool isys::CProfilerTestResult::isError | ( | ) |
Returns true, if any error occurred.
Calls all validate...() methods.
| bool isys::CProfilerTestResult::isResultSet | ( | ) | const |
Returns true, if result was set for this area.
| bool isys::CProfilerTestResult::isValueSet | ( | ) | const |
Returns true, if data value in the test specification was set.
For function profiling it always returns false.
| void isys::CProfilerTestResult::serialize | ( | const isys::IEmitterSPtr & | emitter | ) |
Writes object data to destination object.
| void isys::CProfilerTestResult::serializeErrorsOnly | ( | const isys::IEmitterSPtr & | emitter | ) |
Writes object error data to destination object.
| ProfilerErrCode isys::CProfilerTestResult::validateAllTimes | ( | ProfilerErrCode | prevError | ) |
Returns error status for all time measurements.
| ProfilerErrCode isys::CProfilerTestResult::validateError | ( | CTestProfilerStatistics::EProfilerStatisticsSectionId | statsId, |
| CTestProfilerTime::EProfilerTimeSectionId | timeId ) |
Returns error status for the given time scope and time type.
| ProfilerErrCode isys::CProfilerTestResult::validateHits | ( | ) |
Checks for hits error.
| ProfilerErrCode isys::CProfilerTestResult::validateTimeScopeForAllTimeTypes | ( | CTestProfilerStatistics::EProfilerStatisticsSectionId | statsId | ) |
Returns error status for the given time scope for all time types.
| ProfilerErrCode isys::CProfilerTestResult::validateTimeTypeForAllScopes | ( | CTestProfilerTime::EProfilerTimeSectionId | timeTypeId | ) |
Returns error status for the given time type for all time scopes.