properly honor verbose/no-verbose run flag

This commit is contained in:
Axel Kohlmeyer 2020-05-21 00:48:05 -04:00
parent 4eca3c46a6
commit f9e57392f3
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
3 changed files with 5 additions and 1 deletions

View File

@ -353,6 +353,7 @@ TEST(AngleStyle, plain) {
::testing::internal::CaptureStdout();
LAMMPS *lmp = init_lammps(argc,argv,test_config,true);
std::string output = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << output;
if (!lmp) {
std::cerr << "One or more prerequisite styles are not available "

View File

@ -352,6 +352,7 @@ TEST(BondStyle, plain) {
::testing::internal::CaptureStdout();
LAMMPS *lmp = init_lammps(argc,argv,test_config,true);
std::string output = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << output;
if (!lmp) {
std::cerr << "One or more prerequisite styles are not available "

View File

@ -355,6 +355,7 @@ TEST(PairStyle, plain) {
::testing::internal::CaptureStdout();
LAMMPS *lmp = init_lammps(argc,argv,test_config,true);
std::string output = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << output;
if (!lmp) {
std::cerr << "One or more prerequisite styles are not available "
@ -1253,14 +1254,15 @@ TEST(PairStyle, extract) {
lmp->input->one(line.c_str());
};
if (!verbose) ::testing::internal::CaptureStdout();
command("pair_style " + test_config.pair_style);
EXPECT_EQ(pair, lmp->force->pair);
for (auto& pair_coeff : test_config.pair_coeff) {
command("pair_coeff " + pair_coeff);
}
pair->init();
if (!verbose) ::testing::internal::GetCapturedStdout();
for (int i=1; i <= ntypes; ++i) {
for (int j=1; j <= ntypes; ++j) {