Unverified Commit 9c3d108b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

enable aligning consecutive assignments

parent 3db944de
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@
Language:        Cpp
Language:        Cpp
BasedOnStyle:  LLVM
BasedOnStyle:  LLVM
AccessModifierOffset: -4
AccessModifierOffset: -4
AlignConsecutiveAssignments: true
AlignEscapedNewlines: Left
AlignEscapedNewlines: Left
AllowShortFunctionsOnASingleLine: Inline
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: None
AllowShortLambdasOnASingleLine: None
+57 −51
Original line number Original line Diff line number Diff line
@@ -217,6 +217,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
{
{
    // initialize system geometry
    // initialize system geometry
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);
    LAMMPS *lmp = init_lammps(argc, argv, config);
    LAMMPS *lmp = init_lammps(argc, argv, config);
@@ -350,11 +351,13 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
TEST(AngleStyle, plain)
TEST(AngleStyle, plain)
{
{
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -571,11 +574,13 @@ TEST(AngleStyle, omp)
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite",
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite",
                          "-pk",        "omp",  "4",    "-sf",   "omp"};
                          "-pk",        "omp",  "4",    "-sf",   "omp"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -736,6 +741,7 @@ TEST(AngleStyle, omp)
TEST(AngleStyle, single)
TEST(AngleStyle, single)
{
{
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"AngleStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


+101 −94
Original line number Original line Diff line number Diff line
@@ -217,6 +217,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
{
{
    // initialize system geometry
    // initialize system geometry
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);
    LAMMPS *lmp = init_lammps(argc, argv, config);
    LAMMPS *lmp = init_lammps(argc, argv, config);
@@ -350,11 +351,13 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
TEST(BondStyle, plain)
TEST(BondStyle, plain)
{
{
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -571,11 +574,13 @@ TEST(BondStyle, omp)
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite",
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite",
                          "-pk",       "omp",  "4",    "-sf",   "omp"};
                          "-pk",       "omp",  "4",    "-sf",   "omp"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -735,6 +740,7 @@ TEST(BondStyle, omp)
TEST(BondStyle, single)
TEST(BondStyle, single)
{
{
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


@@ -995,6 +1001,7 @@ TEST(BondStyle, single)
TEST(BondStyle, extract)
TEST(BondStyle, extract)
{
{
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"BondStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


+4 −3
Original line number Original line Diff line number Diff line
@@ -12,6 +12,7 @@
------------------------------------------------------------------------- */
------------------------------------------------------------------------- */


#include "error_stats.h"
#include "error_stats.h"
#include "fmt/format.h"
#include <cmath>
#include <cmath>
#include <iostream>
#include <iostream>
#include <string>
#include <string>
+101 −90
Original line number Original line Diff line number Diff line
@@ -216,6 +216,7 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
{
{
    // initialize system geometry
    // initialize system geometry
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);
    LAMMPS *lmp = init_lammps(argc, argv, config);
    LAMMPS *lmp = init_lammps(argc, argv, config);
@@ -347,11 +348,13 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
TEST(PairStyle, plain)
TEST(PairStyle, plain)
{
{
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -616,11 +619,13 @@ TEST(PairStyle, omp)
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite",
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite",
                          "-pk",       "omp",  "4",    "-sf",   "omp"};
                          "-pk",       "omp",  "4",    "-sf",   "omp"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);
    LAMMPS *lmp = init_lammps(argc, argv, test_config, true);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -780,11 +785,13 @@ TEST(PairStyle, intel)
    const char *args[] = {"PairStyle", "-log",  "none", "-echo", "screen", "-nocite",
    const char *args[] = {"PairStyle", "-log",  "none", "-echo", "screen", "-nocite",
                          "-pk",       "intel", "0",    "mode",  "double", "omp",
                          "-pk",       "intel", "0",    "mode",  "double", "omp",
                          "4",         "lrt",   "no",   "-sf",   "intel"};
                          "4",         "lrt",   "no",   "-sf",   "intel"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    ::testing::internal::CaptureStdout();
    ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config);
    LAMMPS *lmp = init_lammps(argc, argv, test_config);

    std::string output = ::testing::internal::GetCapturedStdout();
    std::string output = ::testing::internal::GetCapturedStdout();
    if (verbose) std::cout << output;
    if (verbose) std::cout << output;


@@ -898,13 +905,15 @@ TEST(PairStyle, opt)
{
{
    if (!LAMMPS::is_installed_pkg("OPT")) GTEST_SKIP();
    if (!LAMMPS::is_installed_pkg("OPT")) GTEST_SKIP();
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "opt"};
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "opt"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


    if (!verbose) ::testing::internal::CaptureStdout();
    if (!verbose) ::testing::internal::CaptureStdout();
    LAMMPS *lmp = init_lammps(argc, argv, test_config);
    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) {
    if (!lmp) {
        std::cerr << "One or more prerequisite styles with /opt suffix\n"
        std::cerr << "One or more prerequisite styles with /opt suffix\n"
@@ -994,6 +1003,7 @@ TEST(PairStyle, opt)
TEST(PairStyle, single)
TEST(PairStyle, single)
{
{
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


@@ -1231,6 +1241,7 @@ TEST(PairStyle, single)
TEST(PairStyle, extract)
TEST(PairStyle, extract)
{
{
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};
    const char *args[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite"};

    char **argv = (char **)args;
    char **argv = (char **)args;
    int argc    = sizeof(args) / sizeof(char *);
    int argc    = sizeof(args) / sizeof(char *);


+18 −18

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+11 −11

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+7 −7

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+22 −22

File changed.

Contains only whitespace changes.

Loading