From 59977d07efba98383dd80cb304f3bf1a41286c53 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 14 Mar 2021 05:00:22 -0400 Subject: [PATCH] fix unit test failure for non-verbose runs --- unittest/commands/test_groups.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittest/commands/test_groups.cpp b/unittest/commands/test_groups.cpp index e3b1511023..7fa7ee721f 100644 --- a/unittest/commands/test_groups.cpp +++ b/unittest/commands/test_groups.cpp @@ -108,7 +108,9 @@ protected: { if (!verbose) ::testing::internal::CaptureStdout(); command("fix props all property/atom mol rmass q"); + if (!verbose) ::testing::internal::GetCapturedStdout(); atomic_system(); + if (!verbose) ::testing::internal::CaptureStdout(); command("variable molid atom floor(id/4)+1"); command("variable charge atom 2.0*sin(PI/32*id)"); command("set atom * mol v_molid"); @@ -237,6 +239,7 @@ TEST_F(GroupTest, SelectRestart) command("write_restart group.restart"); command("clear"); command("read_restart group.restart"); + unlink("group.restart"); if (!verbose) ::testing::internal::GetCapturedStdout(); group = lmp->group; ASSERT_EQ(group->count(group->find("one")), 16);