correct a few more issues with unit tests

This commit is contained in:
Axel Kohlmeyer
2025-04-26 02:42:09 -04:00
parent d89ae3d15d
commit f8bf6d1ad6
2 changed files with 3 additions and 3 deletions

View File

@ -395,7 +395,7 @@ void Set::process_args(int caller_flag, int narg, char **arg)
// unrecognized keyword // unrecognized keyword
} else error->all(FLERR,"Unrecognized set or fix set comand keyword {}",arg[iarg]); } else error->all(FLERR,"Unrecognized set or fix set command keyword {}",arg[iarg]);
} }
// varflag = 1 if any action uses a per-atom variable // varflag = 1 if any action uses a per-atom variable
@ -2228,7 +2228,7 @@ void Set::process_spin_atom(int &iarg, int narg, char **arg, Action *action)
else { else {
action->dvalue1 = utils::numeric(FLERR,arg[iarg+1],false,lmp); action->dvalue1 = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (action->dvalue1 <= 0.0) if (action->dvalue1 <= 0.0)
error->all(FLERR,"Invalid spin magnitude {} in set command"); error->all(FLERR,"Invalid spin magnitude {} in set {} command", action->dvalue1, arg[iarg]);
} }
if (utils::strmatch(arg[iarg+2],"^v_")) varparse(arg[iarg+2],2,action); if (utils::strmatch(arg[iarg+2],"^v_")) varparse(arg[iarg+2],2,action);

View File

@ -92,7 +92,7 @@ TEST_F(SetTest, NoBoxNoAtoms)
TEST_FAILURE(".*ERROR: Illegal set command: need at least four.*", command("set type 1 x");); TEST_FAILURE(".*ERROR: Illegal set command: need at least four.*", command("set type 1 x"););
TEST_FAILURE(".*ERROR: Unknown set or fix set command style: xxx.*", TEST_FAILURE(".*ERROR: Unknown set or fix set command style: xxx.*",
command("set xxx 1 x 0.0");); command("set xxx 1 x 0.0"););
TEST_FAILURE(".*ERROR: Unrecognized set or fix set keyword yyy.*", TEST_FAILURE(".*ERROR: Unrecognized set or fix set command keyword yyy.*",
command("set type 1 yyy 0.0");); command("set type 1 yyy 0.0"););
TEST_FAILURE(".*ERROR: Cannot set attribute spin/atom for atom style atomic.*", TEST_FAILURE(".*ERROR: Cannot set attribute spin/atom for atom style atomic.*",