mirror of https://github.com/lammps/lammps.git
correct test for overload with/without optional format arguments
This commit is contained in:
parent
72036caf71
commit
7bce3a92e2
|
@ -245,16 +245,17 @@ TEST_F(FileOperationsTest, logmesg)
|
|||
command("log test_logmesg.log");
|
||||
utils::logmesg(lmp, "two\n");
|
||||
utils::logmesg(lmp, "three={}\n", 3);
|
||||
utils::logmesg(lmp, "four {}\n");
|
||||
utils::logmesg(lmp, "four {} {}\n", 4);
|
||||
utils::logmesg(lmp, "five\n", 5);
|
||||
utils::logmesg(lmp, "six {}\n");
|
||||
command("log none");
|
||||
std::string out = END_CAPTURE_OUTPUT();
|
||||
memset(buf, 0, 64);
|
||||
FILE *fp = fopen("test_logmesg.log", "r");
|
||||
fread(buf, 1, 64, fp);
|
||||
fclose(fp);
|
||||
ASSERT_THAT(out, StrEq("one\ntwo\nthree=3\nargument not found\nfive\n"));
|
||||
ASSERT_THAT(buf, StrEq("two\nthree=3\nargument not found\nfive\n"));
|
||||
ASSERT_THAT(out, StrEq("one\ntwo\nthree=3\nargument not found\nfive\nsix {}\n"));
|
||||
ASSERT_THAT(buf, StrEq("two\nthree=3\nargument not found\nfive\nsix {}\n"));
|
||||
remove("test_logmesg.log");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue