From cea4298946f8be5a7c605e6d1f9d55abb32ca8cd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 3 Apr 2021 09:59:09 -0400 Subject: [PATCH] silence LAMMPS output, if requested --- unittest/c-library/test_library_properties.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 182beee7d0..2b2b1cd58e 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -160,7 +160,9 @@ TEST_F(LibraryProperties, box) boxlo[0] = -6.1; boxhi[1] = 7.3; xy = 0.1; + if (!verbose) ::testing::internal::CaptureStdout(); lammps_reset_box(lmp, boxlo, boxhi, xy, yz, xz); + if (!verbose) ::testing::internal::GetCapturedStdout(); lammps_extract_box(lmp, boxlo, boxhi, &xy, &yz, &xz, pflags, &boxflag); EXPECT_DOUBLE_EQ(boxlo[0], -6.1); EXPECT_DOUBLE_EQ(boxlo[1], -7.692866);