diff --git a/unittest/force-styles/pair_style.cpp b/unittest/force-styles/pair_style.cpp index 15326e6161..026e71fbda 100644 --- a/unittest/force-styles/pair_style.cpp +++ b/unittest/force-styles/pair_style.cpp @@ -192,24 +192,11 @@ void data_lammps(LAMMPS_NS::LAMMPS *lmp, const TestConfig &cfg) lmp->input->one("run 0 post no"); } -class PairConfigReader : public TestConfigReader -{ -public: - PairConfigReader(TestConfig &config) : TestConfigReader(config) { - consumers["pair_style"] = &TestConfigReader::pair_style; - consumers["pair_coeff"] = &TestConfigReader::pair_coeff; - consumers["init_vdwl"] = &TestConfigReader::init_vdwl; - consumers["init_coul"] = &TestConfigReader::init_coul; - consumers["run_vdwl"] = &TestConfigReader::run_vdwl; - consumers["run_coul"] = &TestConfigReader::run_coul; - } -}; - // read/parse yaml file bool read_yaml_file(const char *infile, TestConfig &config) { - auto reader = PairConfigReader(config); + auto reader = TestConfigReader(config); if (reader.parse_file(infile)) return false; diff --git a/unittest/force-styles/test_config_reader.cpp b/unittest/force-styles/test_config_reader.cpp index d530c81dd1..dcd2836538 100644 --- a/unittest/force-styles/test_config_reader.cpp +++ b/unittest/force-styles/test_config_reader.cpp @@ -41,6 +41,13 @@ TestConfigReader::TestConfigReader(TestConfig & config) consumers["init_forces"] = &TestConfigReader::init_forces; consumers["run_forces"] = &TestConfigReader::run_forces; + consumers["pair_style"] = &TestConfigReader::pair_style; + consumers["pair_coeff"] = &TestConfigReader::pair_coeff; + consumers["init_vdwl"] = &TestConfigReader::init_vdwl; + consumers["init_coul"] = &TestConfigReader::init_coul; + consumers["run_vdwl"] = &TestConfigReader::run_vdwl; + consumers["run_coul"] = &TestConfigReader::run_coul; + consumers["bond_style"] = &TestConfigReader::bond_style; consumers["bond_coeff"] = &TestConfigReader::bond_coeff; consumers["init_energy"] = &TestConfigReader::init_energy;