From f7d6592aa6a612d4ad15c99d8cdadf42dd32cf1b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 8 Apr 2023 04:00:10 -0400 Subject: [PATCH] avoid crash in Pair::single() test on certain inpus --- unittest/force-styles/test_pair_style.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/unittest/force-styles/test_pair_style.cpp b/unittest/force-styles/test_pair_style.cpp index 385525c90b..f44a6e61d3 100644 --- a/unittest/force-styles/test_pair_style.cpp +++ b/unittest/force-styles/test_pair_style.cpp @@ -25,6 +25,7 @@ #include "atom.h" #include "compute.h" +#include "domain.h" #include "force.h" #include "info.h" #include "input.h" @@ -1098,6 +1099,13 @@ TEST(PairStyle, single) command(pre_command); } + if (lmp->domain->box_exist) { + std::cerr << "Cannot test single() with YAML file that creates a box\n"; + cleanup_lammps(lmp, test_config); + if (!verbose) ::testing::internal::GetCapturedStdout(); + GTEST_SKIP(); + } + command("atom_style full"); command("units ${units}"); command("boundary p p p");