simplify and apply clang-format

This commit is contained in:
Axel Kohlmeyer
2021-03-24 11:24:55 -04:00
parent b6a030532d
commit 487c55edf0
21 changed files with 983 additions and 1016 deletions

View File

@ -84,6 +84,8 @@ protected:
if (!verbose) ::testing::internal::GetCapturedStdout();
remove("safe_file_read_test.txt");
}
void command(const std::string &cmd) { lmp->input->one(cmd); }
};
#define MAX_BUF_SIZE 128
@ -155,13 +157,13 @@ TEST_F(FileOperationsTest, logmesg)
{
char buf[8];
::testing::internal::CaptureStdout();
lmp->input->one("echo none");
command("echo none");
::testing::internal::GetCapturedStdout();
::testing::internal::CaptureStdout();
utils::logmesg(lmp, "one\n");
lmp->input->one("log test_logmesg.log");
command("log test_logmesg.log");
utils::logmesg(lmp, "two\n");
lmp->input->one("log none");
command("log none");
std::string out = ::testing::internal::GetCapturedStdout();
memset(buf, 0, 8);
FILE *fp = fopen("test_logmesg.log", "r");