Ocean
|
This class holds the test data necessary for one test iteration combining input data and potential expected test results. More...
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. More... | |
TestData (Value &&value, Value &&expectation=Value()) | |
Creates a new test data object holding a value. More... | |
TestData (Frame &&image, Value &&expectation) | |
Creates a new test data object holding an image. More... | |
DataType | dataType () const |
Returns the data type of this test data object. More... | |
const Value & | value () const |
Returns the value of this object. More... | |
const Frame & | image () const |
Returns the image of this object. More... | |
const Value & | expectation () const |
Returns the potential expectation of this test object. More... | |
bool | isValid () const |
Returns whether this object is valid and holds valid test data. More... | |
operator bool () const | |
Returns whether this object is valid and holds valid test data. More... | |
Protected Attributes | |
DataType | dataType_ = DT_INVALID |
The data type of this test object. More... | |
Value | value_ |
The object's value, invalid if not defined. More... | |
Frame | image_ |
Value | expectation_ |
The object's expectation, invalid if not defined. More... | |
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.