|
Ocean
|
This class holds the test data necessary for one test iteration combining input data and potential expected test results. More...
#include <TestData.h>
Public Types | |
| enum | DataType : uint32_t { DT_INVALID = 0u , DT_VALUE , DT_IMAGE } |
| Definition of individual data types. More... | |
Public Member Functions | |
| TestData ()=default | |
| Default constructor. | |
| TestData (Value &&value, Value &&expectation=Value()) | |
| Creates a new test data object holding a value. | |
| TestData (Frame &&image, Value &&expectation) | |
| Creates a new test data object holding an image. | |
| DataType | dataType () const |
| Returns the data type of this test data object. | |
| const Value & | value () const |
| Returns the value of this object. | |
| const Frame & | image () const |
| Returns the image of this object. | |
| const Value & | expectation () const |
| Returns the potential expectation of this test object. | |
| bool | isValid () const |
| Returns whether this object is valid and holds valid test data. | |
| operator bool () const | |
| Returns whether this object is valid and holds valid test data. | |
Protected Attributes | |
| DataType | dataType_ = DT_INVALID |
| The data type of this test object. | |
| Value | value_ |
| The object's value, invalid if not defined. | |
| Frame | image_ |
| Value | expectation_ |
| The object's expectation, invalid if not defined. | |
This class holds the test data necessary for one test iteration combining input data and potential expected test results.
| enum Ocean::Test::TestData::DataType : uint32_t |
|
default |
Default constructor.
Creates a new test data object holding a value.
| value | The value of the new object, must be valid |
| expectation | The optional test expectation for the new object |
Creates a new test data object holding an image.
| image | The image of the new object, must be valid |
| expectation | The optional test expectation for the new object |
|
inline |
Returns the data type of this test data object.
|
inline |
Returns the potential expectation of this test object.
|
inline |
Returns the image of this object.
Ensure that dataType() == DT_IMAGE before calling this function.
|
inline |
Returns whether this object is valid and holds valid test data.
|
inlineexplicit |
Returns whether this object is valid and holds valid test data.
|
inline |
Returns the value of this object.
Ensure that dataType() == DT_VALUE before calling this function.
|
protected |
The data type of this test object.
|
protected |
The object's expectation, invalid if not defined.
|
protected |
|
protected |
The object's value, invalid if not defined.