From 67b6a1de705a32923def69a72b9aa637d6cae845 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 May 2023 20:09:57 -0400 Subject: [PATCH] fixup broken unit tests --- src/variable.cpp | 4 ++-- unittest/commands/test_variables.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/variable.cpp b/src/variable.cpp index 12be445128..af0d33449a 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -4094,11 +4094,11 @@ int Variable::special_function(char *word, char *contents, Tree **tree, Tree **t } else if (kind == "improper") { value = atom->lmap->find(typestr,Atom::IMPROPER); } else { - print_var_error(FLERR, fmt::format("Invalid kind {} in label2type in variable",kind), ivar); + print_var_error(FLERR, fmt::format("Invalid kind {} in label2type() in variable",kind),ivar); } if (value == -1) - print_var_error(FLERR, fmt::format("Invalid {} type label {} in label2type in variable", + print_var_error(FLERR, fmt::format("Invalid {} type label {} in label2type() in variable", kind, typestr), ivar); // save value in tree or on argstack diff --git a/unittest/commands/test_variables.cpp b/unittest/commands/test_variables.cpp index 8debb95b6a..fbb2beb220 100644 --- a/unittest/commands/test_variables.cpp +++ b/unittest/commands/test_variables.cpp @@ -402,7 +402,7 @@ TEST_F(VariableTest, Functions) command("print \"$(extract_setting()\"");); TEST_FAILURE(".*ERROR on proc 0: Invalid immediate variable.*", command("print \"$(extract_setting()\"");); - TEST_FAILURE(".*ERROR: Invalid extract_setting.. function syntax in variable formula.*", + TEST_FAILURE(".*ERROR: Invalid extract_setting.. function in variable formula.*", command("print \"$(extract_setting(one,two))\"");); TEST_FAILURE( ".*ERROR: Unknown setting nprocs for extract_setting.. function in variable formula.*", @@ -599,9 +599,9 @@ TEST_F(VariableTest, Label2TypeAtomic) ASSERT_DOUBLE_EQ(variable->compute_equal("label2type(atom,O1)"), 3.0); ASSERT_DOUBLE_EQ(variable->compute_equal("label2type(atom,H1)"), 4.0); - TEST_FAILURE(".*ERROR: Variable t1: Invalid atom type label C1 in variable formula.*", + TEST_FAILURE(".*ERROR: Variable t1: Invalid atom type label C1 in label2type.. in variable.*", command("print \"${t1}\"");); - TEST_FAILURE(".*ERROR: Invalid bond type label H1 in variable formula.*", + TEST_FAILURE(".*ERROR: Invalid bond type label H1 in label2type.. in variable.*", variable->compute_equal("label2type(bond,H1)");); }