From 7f699e9233bd6cf121c38f4dcb783d79229f7d62 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 26 May 2020 21:08:26 -0400 Subject: [PATCH] fix verbosity handling issue in pair style tests --- unittest/force-styles/pair_style.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/unittest/force-styles/pair_style.cpp b/unittest/force-styles/pair_style.cpp index cfe91682bb..e68828b2bc 100644 --- a/unittest/force-styles/pair_style.cpp +++ b/unittest/force-styles/pair_style.cpp @@ -645,6 +645,7 @@ TEST(PairStyle, omp) { ::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 with /omp suffix\n" @@ -817,10 +818,10 @@ TEST(PairStyle, intel) { char **argv = (char **)args; int argc = sizeof(args)/sizeof(char *); - if (!verbose) ::testing::internal::CaptureStdout(); + ::testing::internal::CaptureStdout(); LAMMPS *lmp = init_lammps(argc,argv,test_config); - std::string output; - if (!verbose) output = ::testing::internal::GetCapturedStdout(); + std::string output = ::testing::internal::GetCapturedStdout(); + if (verbose) std::cout << output; if (!lmp) { std::cerr << "One or more prerequisite styles with /intel suffix\n"