correct test for overload with/without optional format arguments

This commit is contained in:
Axel Kohlmeyer 2022-08-04 22:00:13 -04:00
parent 72036caf71
commit 7bce3a92e2
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 4 additions and 3 deletions

View File

@ -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");
}