Merge remote-tracking branch 'origin/develop' into kokkos_unittests
This commit is contained in:
@ -1,26 +1,26 @@
|
||||
|
||||
add_executable(test_library_open test_library_open.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_open PRIVATE lammps GTest::GMock)
|
||||
add_test(LibraryOpen test_library_open)
|
||||
add_test(NAME LibraryOpen COMMAND test_library_open)
|
||||
|
||||
add_executable(test_library_commands test_library_commands.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_commands PRIVATE lammps GTest::GMock)
|
||||
add_test(LibraryCommands test_library_commands)
|
||||
add_test(NAME LibraryCommands COMMAND test_library_commands)
|
||||
|
||||
add_executable(test_library_external test_library_external.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_external PRIVATE lammps GTest::GMock)
|
||||
add_test(LibraryExternal test_library_external)
|
||||
add_test(NAME LibraryExternal COMMAND test_library_external)
|
||||
|
||||
add_executable(test_library_properties test_library_properties.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_properties PRIVATE lammps GTest::GMock)
|
||||
target_compile_definitions(test_library_properties PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_test(LibraryProperties test_library_properties)
|
||||
add_test(NAME LibraryProperties COMMAND test_library_properties)
|
||||
set_tests_properties(LibraryProperties PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
|
||||
add_executable(test_library_scatter_gather test_library_scatter_gather.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_scatter_gather PRIVATE lammps GTest::GMock)
|
||||
target_compile_definitions(test_library_scatter_gather PRIVATE -DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_test(LibraryScatterGather test_library_scatter_gather)
|
||||
add_test(NAME LibraryScatterGather COMMAND test_library_scatter_gather)
|
||||
set_tests_properties(LibraryScatterGather PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
|
||||
set(TEST_CONFIG_DEFS "-DTEST_INPUT_FOLDER=${CMAKE_CURRENT_SOURCE_DIR};-DLAMMPS_${LAMMPS_SIZES}")
|
||||
@ -65,7 +65,7 @@ endforeach()
|
||||
add_executable(test_library_config test_library_config.cpp test_main.cpp)
|
||||
target_link_libraries(test_library_config PRIVATE lammps GTest::GMock)
|
||||
target_compile_definitions(test_library_config PRIVATE ${TEST_CONFIG_DEFS})
|
||||
add_test(LibraryConfig test_library_config)
|
||||
add_test(NAME LibraryConfig COMMAND test_library_config)
|
||||
|
||||
add_executable(test_library_mpi test_library_mpi.cpp)
|
||||
target_link_libraries(test_library_mpi PRIVATE lammps GTest::GMock)
|
||||
|
||||
@ -20,7 +20,7 @@ const char *cont_input[] = {"create_atoms 1 single &", "0.2 0.1 0.1"};
|
||||
class LibraryCommands : public ::testing::Test {
|
||||
protected:
|
||||
void *lmp;
|
||||
LibraryCommands() = default;
|
||||
LibraryCommands() = default;
|
||||
~LibraryCommands() override = default;
|
||||
|
||||
void SetUp() override
|
||||
@ -55,13 +55,13 @@ TEST_F(LibraryCommands, from_file)
|
||||
const char cont_file[] = "in.cont";
|
||||
|
||||
fp = fopen(demo_file, "w");
|
||||
for (auto & inp : demo_input) {
|
||||
for (auto &inp : demo_input) {
|
||||
fputs(inp, fp);
|
||||
fputc('\n', fp);
|
||||
}
|
||||
fclose(fp);
|
||||
fp = fopen(cont_file, "w");
|
||||
for (auto & inp : cont_input) {
|
||||
for (auto &inp : cont_input) {
|
||||
fputs(inp, fp);
|
||||
fputc('\n', fp);
|
||||
}
|
||||
@ -85,7 +85,7 @@ TEST_F(LibraryCommands, from_line)
|
||||
{
|
||||
EXPECT_EQ(lammps_get_natoms(lmp), 0);
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
for (auto & inp : demo_input) {
|
||||
for (auto &inp : demo_input) {
|
||||
lammps_command(lmp, inp);
|
||||
}
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
@ -106,11 +106,11 @@ TEST_F(LibraryCommands, from_string)
|
||||
{
|
||||
std::string cmds("");
|
||||
|
||||
for (auto & inp : demo_input) {
|
||||
for (auto &inp : demo_input) {
|
||||
cmds += inp;
|
||||
cmds += "\n";
|
||||
}
|
||||
for (auto & inp : cont_input) {
|
||||
for (auto &inp : cont_input) {
|
||||
cmds += inp;
|
||||
cmds += "\n";
|
||||
}
|
||||
@ -126,11 +126,11 @@ TEST_F(LibraryCommands, from_string)
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
|
||||
cmds.clear();
|
||||
for (auto & inp : demo_input) {
|
||||
for (auto &inp : demo_input) {
|
||||
cmds += inp;
|
||||
cmds += "\r\n";
|
||||
}
|
||||
for (auto & inp : cont_input) {
|
||||
for (auto &inp : cont_input) {
|
||||
cmds += inp;
|
||||
cmds += "\r\n";
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
LibraryConfig() = default;
|
||||
LibraryConfig() = default;
|
||||
~LibraryConfig() override = default;
|
||||
|
||||
void SetUp() override
|
||||
|
||||
@ -25,7 +25,7 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
LibraryProperties() = default;
|
||||
LibraryProperties() = default;
|
||||
~LibraryProperties() override = default;
|
||||
|
||||
void SetUp() override
|
||||
@ -438,8 +438,10 @@ class AtomProperties : public ::testing::Test {
|
||||
protected:
|
||||
void *lmp;
|
||||
|
||||
AtomProperties()= default;;
|
||||
~AtomProperties() override= default;;
|
||||
AtomProperties() = default;
|
||||
;
|
||||
~AtomProperties() override = default;
|
||||
;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
GatherProperties() = default;
|
||||
GatherProperties() = default;
|
||||
~GatherProperties() override = default;
|
||||
|
||||
void SetUp() override
|
||||
|
||||
Reference in New Issue
Block a user