From e813e2d30ae8983c03e1c0e11d04252903e6dd86 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 9 Sep 2020 22:12:47 -0400 Subject: [PATCH] add minimal unit test for lammps_get_mpi_comm() API --- unittest/c-library/test_library_properties.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 87b4d54f86..5e8c410cce 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -41,5 +41,13 @@ protected: } }; +TEST_F(LAMMPS_properties, get_mpi_comm) { + int f_comm = lammps_get_mpi_comm(lmp); + if (lammps_config_has_mpi_support()) + EXPECT_GE(f_comm,0); + else + EXPECT_EQ(f_comm,-1); +}; + TEST_F(LAMMPS_properties, box) { };