apply clang-format

This commit is contained in:
Axel Kohlmeyer
2022-01-30 17:18:40 -05:00
parent 3707b327c0
commit 7ee7d0c570
25 changed files with 77 additions and 68 deletions

View File

@ -436,8 +436,10 @@ class AtomProperties : public ::testing::Test {
protected:
void *lmp;
AtomProperties()= default;;
~AtomProperties() override= default;;
AtomProperties() = default;
;
~AtomProperties() override = default;
;
void SetUp() override
{

View File

@ -35,8 +35,8 @@ bool verbose = false;
using LAMMPS_NS::utils::split_words;
namespace LAMMPS_NS {
using ::testing::ExitedWithCode;
using ::testing::ContainsRegex;
using ::testing::ExitedWithCode;
using ::testing::StrEq;
class LatticeRegionTest : public LAMMPSTest {

View File

@ -39,8 +39,8 @@ bool verbose = false;
using LAMMPS_NS::utils::split_words;
namespace LAMMPS_NS {
using ::testing::ExitedWithCode;
using ::testing::ContainsRegex;
using ::testing::ExitedWithCode;
using ::testing::StrEq;
class SimpleCommandsTest : public LAMMPSTest {
@ -479,7 +479,8 @@ TEST_F(SimpleCommandsTest, Shell)
test_var = getenv("TEST_VARIABLE");
ASSERT_NE(test_var, nullptr);
#if defined(_WIN32)
// we cannot create empty environment variables on Windows so platform::putenv() sets their value to "1"
// we cannot create empty environment variables on Windows so platform::putenv() sets their
// value to "1"
ASSERT_THAT(test_var, StrEq("1"));
#else
ASSERT_THAT(test_var, StrEq(""));
@ -501,7 +502,8 @@ TEST_F(SimpleCommandsTest, CiteMe)
// find the two unique citations, but not the third
ASSERT_THAT(text, ContainsRegex("test citation one.\n.*test citation two.*"));
ASSERT_THAT(text, Not(ContainsRegex("test citation one.\n.*test citation two.*\n.*test citation one.*")));
ASSERT_THAT(text, Not(ContainsRegex(
"test citation one.\n.*test citation two.*\n.*test citation one.*")));
BEGIN_CAPTURE_OUTPUT();
lmp->citeme->add("test citation one:\n 0\n");

View File

@ -36,8 +36,8 @@ using LAMMPS_NS::MathConst::MY_PI;
using LAMMPS_NS::utils::split_words;
namespace LAMMPS_NS {
using ::testing::ExitedWithCode;
using ::testing::ContainsRegex;
using ::testing::ExitedWithCode;
using ::testing::StrEq;
class VariableTest : public LAMMPSTest {

View File

@ -372,8 +372,8 @@ TEST(LAMMPS_init, NoOpenMP)
::testing::internal::CaptureStdout();
LAMMPS *lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD);
std::string output = ::testing::internal::GetCapturedStdout();
EXPECT_THAT(output,
ContainsRegex(".*OMP_NUM_THREADS environment is not set.*Defaulting to 1 thread.*"));
EXPECT_THAT(output, ContainsRegex(
".*OMP_NUM_THREADS environment is not set.*Defaulting to 1 thread.*"));
EXPECT_EQ(lmp->comm->nthreads, 1);
::testing::internal::CaptureStdout();
delete lmp;

View File

@ -334,7 +334,9 @@ TEST_F(FileOperationsTest, write_restart)
ASSERT_FILE_EXISTS("multi2-0.restart");
ASSERT_FILE_EXISTS("multi3-base.restart");
ASSERT_FILE_EXISTS("multi3-0.restart");
if (info->has_package("MPIIO")) { ASSERT_FILE_EXISTS("test.restart.mpiio"); }
if (info->has_package("MPIIO")) {
ASSERT_FILE_EXISTS("test.restart.mpiio");
}
if (!info->has_package("MPIIO")) {
TEST_FAILURE(".*ERROR: Writing to MPI-IO filename when MPIIO package is not inst.*",

View File

@ -197,7 +197,8 @@ TEST_F(MoleculeFileTest, extramass)
command("atom_style atomic");
command("region box block 0 1 0 1 0 1");
command("create_box 1 box");
run_mol_cmd(test_name, "", "Comment\n1 atoms\n\n Coords\n\n 1 0.0 0.0 0.0\n"
run_mol_cmd(test_name, "",
"Comment\n1 atoms\n\n Coords\n\n 1 0.0 0.0 0.0\n"
" Types\n\n 1 1\n Masses\n\n 1 1.0\n");
command("create_atoms 0 single 0.0 0.0 0.0 mol extramass 73546");
auto output = END_CAPTURE_OUTPUT();
@ -222,7 +223,9 @@ TEST_F(MoleculeFileTest, twofiles)
BEGIN_CAPTURE_OUTPUT();
command("molecule twomols moltest.h2o.mol moltest.co2.mol offset 2 1 1 0 0");
auto output = END_CAPTURE_OUTPUT();
ASSERT_THAT(output, ContainsRegex(".*Read molecule template twomols:.*\n.*1 molecules.*\n"
ASSERT_THAT(
output,
ContainsRegex(".*Read molecule template twomols:.*\n.*1 molecules.*\n"
".*0 fragments.*\n.*3 atoms with max type 2.*\n.*2 bonds with max type 1.*\n"
".*1 angles with max type 1.*\n.*0 dihedrals.*\n.*0 impropers.*\n"
".*Read molecule template twomols:.*\n.*1 molecules.*\n"

View File

@ -43,9 +43,9 @@ bool verbose = false;
using LAMMPS_NS::utils::split_words;
namespace LAMMPS_NS {
using ::testing::ContainsRegex;
using ::testing::Eq;
using ::testing::HasSubstr;
using ::testing::ContainsRegex;
using ::testing::StrEq;
class PythonPackageTest : public LAMMPSTest {