rename reset_ids command to reset_atom_ids
This commit is contained in:
@ -3,7 +3,7 @@ add_executable(test_simple_commands test_simple_commands.cpp)
|
||||
target_link_libraries(test_simple_commands PRIVATE lammps GTest::GMock GTest::GTest)
|
||||
add_test(NAME SimpleCommands COMMAND test_simple_commands WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_executable(test_reset_mol_ids test_reset_mol_ids.cpp)
|
||||
target_compile_definitions(test_reset_mol_ids PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(test_reset_mol_ids PRIVATE lammps GTest::GMock GTest::GTest)
|
||||
add_test(NAME ResetMolIDs COMMAND test_reset_mol_ids WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_executable(test_reset_ids test_reset_ids.cpp)
|
||||
target_compile_definitions(test_reset_ids PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(test_reset_ids PRIVATE lammps GTest::GMock GTest::GTest)
|
||||
add_test(NAME ResetIDs COMMAND test_reset_ids WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
@ -45,13 +45,13 @@ using ::testing::MatchesRegex;
|
||||
#define STRINGIFY(val) XSTR(val)
|
||||
#define XSTR(val) #val
|
||||
|
||||
class ResetMolIDsTest : public ::testing::Test {
|
||||
class ResetIDsTest : public ::testing::Test {
|
||||
protected:
|
||||
LAMMPS *lmp;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
const char *args[] = {"ResetMolIDsTest", "-log", "none", "-nocite", "-echo", "screen"};
|
||||
const char *args[] = {"ResetIDsTest", "-log", "none", "-nocite", "-echo", "screen"};
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
@ -72,7 +72,7 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ResetMolIDsTest, Plain)
|
||||
TEST_F(ResetIDsTest, MolIDAll)
|
||||
{
|
||||
if (lmp->atom->natoms == 0) GTEST_SKIP();
|
||||
|
||||
@ -144,7 +144,7 @@ TEST_F(ResetMolIDsTest, Plain)
|
||||
ASSERT_EQ(molid[GETIDX(29)], 5);
|
||||
}
|
||||
|
||||
TEST_F(ResetMolIDsTest, DeletePlusAtomID)
|
||||
TEST_F(ResetIDsTest, DeletePlusAtomID)
|
||||
{
|
||||
if (lmp->atom->natoms == 0) GTEST_SKIP();
|
||||
|
||||
@ -214,7 +214,7 @@ TEST_F(ResetMolIDsTest, DeletePlusAtomID)
|
||||
EXPECT_GE(GETIDX(26), 0);
|
||||
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp->input->one("reset_ids");
|
||||
lmp->input->one("reset_atom_ids");
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
ASSERT_EQ(lmp->atom->map_tag_max, 23);
|
||||
Reference in New Issue
Block a user