remove obsolete unittest code specific to handling the case of lammps exceptions disabled

This commit is contained in:
Axel Kohlmeyer
2023-04-16 12:34:47 -04:00
parent 98efb19e79
commit 5f4a80d41f
23 changed files with 14 additions and 89 deletions

View File

@ -73,16 +73,14 @@ TEST_F(LeptonUtilsTest, substitute)
lmp->update->reset_timestep(100LL, false);
ASSERT_THAT(LeptonUtils::substitute("(2.5/v_pre)", lmp), StrEq("(2.5/0.1)"));
if (LAMMPS_NS::Info::has_exceptions()) {
bool caught = false;
try {
LeptonUtils::substitute("v_none", lmp);
} catch (std::exception &e) {
ASSERT_THAT(e.what(), StrEq("Variable none in expression v_none does not exist"));
caught = true;
}
ASSERT_TRUE(caught);
bool caught = false;
try {
LeptonUtils::substitute("v_none", lmp);
} catch (std::exception &e) {
ASSERT_THAT(e.what(), StrEq("Variable none in expression v_none does not exist"));
caught = true;
}
ASSERT_TRUE(caught);
}
// zbl() custom function