use clang-tidy and clang-format to update/modernize/simplify code

This commit is contained in:
Axel Kohlmeyer
2022-05-31 14:46:57 -04:00
parent 7c0c7ce93c
commit 234b9f180a
19 changed files with 146 additions and 132 deletions

View File

@ -322,7 +322,7 @@ TEST_F(FileOperationsTest, write_restart)
command("write_restart multi-%.restart");
command("write_restart multi2-%.restart fileper 2");
command("write_restart multi3-%.restart nfile 1");
if (info->has_package("MPIIO")) command("write_restart test.restart.mpiio");
if (Info::has_package("MPIIO")) command("write_restart test.restart.mpiio");
END_HIDE_OUTPUT();
ASSERT_FILE_EXISTS("noinit.restart");
@ -334,11 +334,11 @@ TEST_F(FileOperationsTest, write_restart)
ASSERT_FILE_EXISTS("multi2-0.restart");
ASSERT_FILE_EXISTS("multi3-base.restart");
ASSERT_FILE_EXISTS("multi3-0.restart");
if (info->has_package("MPIIO")) {
if (Info::has_package("MPIIO")) {
ASSERT_FILE_EXISTS("test.restart.mpiio");
}
if (!info->has_package("MPIIO")) {
if (!Info::has_package("MPIIO")) {
TEST_FAILURE(".*ERROR: Writing to MPI-IO filename when MPIIO package is not inst.*",
command("write_restart test.restart.mpiio"););
} else {
@ -395,7 +395,7 @@ TEST_F(FileOperationsTest, write_restart)
delete_file("multi3-base.restart");
delete_file("multi3-0.restart");
delete_file("triclinic.restart");
if (info->has_package("MPIIO")) delete_file("test.restart.mpiio");
if (Info::has_package("MPIIO")) delete_file("test.restart.mpiio");
}
TEST_F(FileOperationsTest, write_data)
@ -492,7 +492,7 @@ int main(int argc, char **argv)
MPI_Init(&argc, &argv);
::testing::InitGoogleMock(&argc, argv);
if (platform::mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions())
if (platform::mpi_vendor() == "Open MPI" && !Info::has_exceptions())
std::cout << "Warning: using OpenMPI without exceptions. "
"Death tests will be skipped\n";