abstract_regression_test_generator.h
Go to the documentation of this file.
88 return ::testing::AssertionFailure() << "Failed to generate data for baseline: " << baseline_file;
105 //return ::testing::AssertionFailure() << "Failed to generate baseline: " << baseline_file << " " << ex.what();
116 return io::combine(io::combine(io::combine(regression_test_data::instance().baseline(), io::basename(m_run_folder)), m_test_dir), "baseline");
158 inline void read_metrics_safe(model::metrics::run_metrics& metrics, const std::string& run_folder)
Definition: enum_description.h:15
std::string basename(std::string const &source)
Definition: filesystem.cpp:95
Definition: run_metrics.h:54
Definition: generic_fixture.h:23
std::string combine(const std::string &path, const std::string &name)
Definition: filesystem.cpp:39
base_t operator()(const std::string &name) const
Definition: abstract_regression_test_generator.h:55
virtual bool read_expected(const std::string &baseline_file, Model &expected) const =0
virtual base_t clone() const =0
abstract_regression_test_generator(const std::string &run_folder, const std::string &test_dir, const int test_modifier=0)
Definition: abstract_regression_test_generator.h:44
static regression_test_data & instance()
Definition: regression_test_data.h:33
void add_subdir(const std::string &path)
Definition: regression_test_data.h:100
virtual std::string baseline() const
Definition: abstract_regression_test_generator.h:114
::testing::AssertionResult generate(Model &expected, Model &actual, bool *skip_test) const
Definition: abstract_regression_test_generator.h:73
int test_modifier() const
Definition: generic_fixture.h:63
abstract_generator< Model >::parent_type base_t
Definition: abstract_regression_test_generator.h:26
void read_metrics_safe(model::metrics::run_metrics &metrics, const std::string &run_folder)
Definition: abstract_regression_test_generator.h:158
abstract_regression_test_generator(const std::string &test_dir, const int test_modifier=0)
Definition: abstract_regression_test_generator.h:33
std::string m_run_folder
Definition: abstract_regression_test_generator.h:148
Definition: abstract_regression_test_generator.h:22
virtual bool write_actual(const std::string &baseline_file, const Model &actual) const =0
Definition: run_exceptions.h:75
std::string m_test_dir
Definition: abstract_regression_test_generator.h:150
virtual bool generate_actual(const std::string &run_folder, Model &actual) const =0
Definition: regression_test_data.h:18
void rebaseline(const bool rebase)
Definition: regression_test_data.h:82