abstract_regression_test_generator< Model > Class Template Referenceabstract

#include <abstract_regression_test_generator.h>

Inheritance diagram for abstract_regression_test_generator< Model >:
abstract_generator< Model >

Public Types

typedef abstract_generator< Model >::parent_type base_t
 
- Public Types inherited from abstract_generator< Model >
typedef generator_ptr< Model > parent_type
 

Public Member Functions

 abstract_regression_test_generator (const std::string &test_dir, const int test_modifier=0)
 
 abstract_regression_test_generator (const std::string &run_folder, const std::string &test_dir, const int test_modifier=0)
 
base_t operator() (const std::string &name) const
 
virtual base_t clone (const std::string &name) const =0
 
::testing::AssertionResult generate (Model &expected, Model &actual, bool *skip_test) const
 
virtual std::string baseline () const
 
- Public Member Functions inherited from abstract_generator< Model >
 abstract_generator (const int test_modifier=0)
 
virtual ~abstract_generator ()
 
virtual bool advance ()
 
int test_modifier () const
 
virtual void write (std::ostream &out) const =0
 
std::string info () const
 

Protected Member Functions

virtual bool read_expected (const std::string &baseline_file, Model &expected) const =0
 
virtual bool generate_actual (const std::string &run_folder, Model &actual) const =0
 
virtual bool write_actual (const std::string &baseline_file, const Model &actual) const =0
 
virtual base_t clone () const =0
 

Protected Attributes

std::string m_run_folder
 
std::string m_test_dir
 

Detailed Description

template<class Model>
class illumina::interop::unittest::abstract_regression_test_generator< Model >

Generate the actual metric set writing out the expected and reading it back in again

The expected metric set is provided by the generator.

Member Typedef Documentation

Define the abstract base type

Constructor & Destructor Documentation

abstract_regression_test_generator ( const std::string &  test_dir,
const int  test_modifier = 0 
)
inline

Constructor

Parameters
test_dirtest subdir
test_modifierflag to modify a test
abstract_regression_test_generator ( const std::string &  run_folder,
const std::string &  test_dir,
const int  test_modifier = 0 
)
inline

Constructor

Parameters
run_folderrun folder
test_dirtest subdir
test_modifierflag to modify a test

Member Function Documentation

virtual std::string baseline ( ) const
inlinevirtual

Get the full path of the baseline output file

Returns
full path

Reimplemented in regression_test_metric_generator< MetricSet >, and plot_regression_test_generator< PlotData >.

virtual base_t clone ( const std::string &  name) const
pure virtual
::testing::AssertionResult generate ( Model &  expected,
Model &  actual,
bool *  skip_test 
) const
inlinevirtual

Generate the expected and actual metric sets

Parameters
expectedexpected metric set
actualactual metric set
skip_testflag to set if the test should be skipped
Returns
success if the results should be tested

Implements abstract_generator< Model >.

virtual bool generate_actual ( const std::string &  run_folder,
Model &  actual 
) const
protectedpure virtual

Read the actual data from the run folder

Parameters
run_folderrun folder
actualactual model data
Returns
true if data was generated

Implemented in regression_test_summary_generator< Logic >, regression_test_index_summary_generator, regression_test_metric_generator< MetricSet >, imaging_table_regression_test, regression_test_metric_generator, and plot_regression_test_generator< PlotData >.

base_t operator() ( const std::string &  name) const
inline

Clone the concrete implementation

Parameters
namerun folder
Returns
copy of this object
virtual bool read_expected ( const std::string &  baseline_file,
Model &  expected 
) const
protectedpure virtual

Read the expected data from the baseline file into the model

Parameters
baseline_filebaseline file
expectedexpected model data
Returns
true if the file was found, and the read completed without failure

Implemented in regression_test_summary_generator< Logic >, regression_test_index_summary_generator, regression_test_metric_generator< MetricSet >, imaging_table_regression_test, plot_regression_test_generator< PlotData >, and regression_test_metric_generator.

virtual bool write_actual ( const std::string &  baseline_file,
const Model &  actual 
) const
protectedpure virtual

Member Data Documentation

std::string m_run_folder
mutableprotected

Run Folder name

std::string m_test_dir
protected

Test output dir


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