Use platform::unlink in unittests

This commit is contained in:
Richard Berger
2021-11-22 14:40:51 -05:00
parent a6ccdd72ec
commit bb127603ff
6 changed files with 21 additions and 48 deletions

View File

@ -54,16 +54,10 @@ using ::testing::StartsWith;
using namespace LAMMPS_NS;
static void delete_file(const std::string &filename)
{
remove(filename.c_str());
};
void cleanup_lammps(LAMMPS *lmp, const TestConfig &cfg)
{
delete_file(cfg.basename + ".restart");
platform::unlink(cfg.basename + ".restart");
delete lmp;
lmp = nullptr;
}
LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool use_respa = false)