add unit test for lammps_memory_usage()

This commit is contained in:
Axel Kohlmeyer 2020-09-15 12:29:03 -04:00
parent 3576464268
commit 2f3c916a57
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,17 @@ TEST_F(LibraryProperties, version)
EXPECT_GE(20200824, lammps_version(lmp));
};
TEST_F(LibraryProperties, memory_usage)
{
double meminfo[3];
lammps_memory_usage(lmp,meminfo);
EXPECT_GT(meminfo[0], 0.0);
#if defined(__linux__) || defined(_WIN32)
EXPECT_GT(meminfo[1], 0.0);
#endif
EXPECT_GT(meminfo[2], 0.0);
};
TEST_F(LibraryProperties, get_mpi_comm)
{
int f_comm = lammps_get_mpi_comm(lmp);