Compute Library
 22.08
DataTestCaseFactory< T, D > Class Template Referencefinal

Implementation of a test case factory to create data test cases. More...

#include <TestCaseFactory.h>

Collaboration diagram for DataTestCaseFactory< T, D >:
[legend]

Public Member Functions

 DataTestCaseFactory (std::string suite_name, std::string test_name, DatasetMode mode, Status status, std::string description, const D &data)
 Constructor. More...
 
std::unique_ptr< TestCasemake () const override
 Factory function to create the test case. More...
 
- Public Member Functions inherited from TestCaseFactory
 TestCaseFactory (std::string suite_name, std::string name, DatasetMode mode, Status status, std::string description="")
 Constructor. More...
 
virtual ~TestCaseFactory ()=default
 Default destructor. More...
 
std::string name () const
 Name of the test case. More...
 
DatasetMode mode () const
 Get the mode for which test case will be enabled. More...
 
Status status () const
 Get the status of the test case. More...
 

Additional Inherited Members

- Public Types inherited from TestCaseFactory
enum  Status { ACTIVE, EXPECTED_FAILURE, DISABLED }
 Test case status. More...
 

Detailed Description

template<typename T, typename D>
class arm_compute::test::framework::DataTestCaseFactory< T, D >

Implementation of a test case factory to create data test cases.

Definition at line 114 of file TestCaseFactory.h.

Constructor & Destructor Documentation

◆ DataTestCaseFactory()

DataTestCaseFactory ( std::string  suite_name,
std::string  test_name,
DatasetMode  mode,
Status  status,
std::string  description,
const D &  data 
)
inline

Constructor.

Parameters
[in]suite_nameName of the test suite to which the test case has been added.
[in]test_nameName of the test case.
[in]modeMode in which the test case is enabled.
[in]statusStatus of the test case.
[in]descriptionDescription of data arguments.
[in]dataInput data for the test case.

Definition at line 189 of file TestCaseFactory.h.

References TestCaseFactory::mode(), and TestCaseFactory::status().

190  : TestCaseFactory{ std::move(suite_name), std::move(test_name), mode, status, std::move(description) }, _data{ data }
191 {
192 }
DatasetMode mode() const
Get the mode for which test case will be enabled.
TestCaseFactory(std::string suite_name, std::string name, DatasetMode mode, Status status, std::string description="")
Constructor.
Status status() const
Get the status of the test case.

Member Function Documentation

◆ make()

std::unique_ptr< TestCase > make ( ) const
inlineoverridevirtual

Factory function to create the test case.

Returns
Unique pointer to a newly created test case.

Implements TestCaseFactory.

Definition at line 195 of file TestCaseFactory.h.

196 {
197  return std::make_unique<T>(_data);
198 }

The documentation for this class was generated from the following file: