From f8bf6d1ad6de020c30b17a794cfecd702901e10e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 26 Apr 2025 02:42:09 -0400 Subject: [PATCH] correct a few more issues with unit tests --- src/set.cpp | 4 ++-- unittest/commands/test_set_property.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/set.cpp b/src/set.cpp index b8cd2a710e..951655879a 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -395,7 +395,7 @@ void Set::process_args(int caller_flag, int narg, char **arg) // 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 @@ -2228,7 +2228,7 @@ void Set::process_spin_atom(int &iarg, int narg, char **arg, Action *action) else { action->dvalue1 = utils::numeric(FLERR,arg[iarg+1],false,lmp); 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); diff --git a/unittest/commands/test_set_property.cpp b/unittest/commands/test_set_property.cpp index 7944e36222..26635d225f 100644 --- a/unittest/commands/test_set_property.cpp +++ b/unittest/commands/test_set_property.cpp @@ -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: Unknown set or fix set command style: xxx.*", 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");); TEST_FAILURE(".*ERROR: Cannot set attribute spin/atom for atom style atomic.*",