use '= default' when default functions should be used
This commit is contained in:
@ -19,8 +19,8 @@ const char *cont_input[] = {"create_atoms 1 single &", "0.2 0.1 0.1"};
|
||||
class LibraryCommands : public ::testing::Test {
|
||||
protected:
|
||||
void *lmp;
|
||||
LibraryCommands(){};
|
||||
~LibraryCommands() override{};
|
||||
LibraryCommands() = default;
|
||||
~LibraryCommands() override = default;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
@ -31,7 +31,7 @@ protected:
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, NULL);
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
|
||||
@ -22,8 +22,8 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
LibraryConfig(){};
|
||||
~LibraryConfig() override{};
|
||||
LibraryConfig() = default;
|
||||
~LibraryConfig() override = default;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
@ -35,7 +35,7 @@ protected:
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, NULL);
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
lammps_command(lmp, "fix charge all property/atom q ghost yes");
|
||||
lammps_command(lmp, "region box block 0 1 0 1 0 1");
|
||||
lammps_command(lmp, "create_box 1 box");
|
||||
|
||||
@ -69,7 +69,7 @@ TEST(lammps_external, callback)
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
void *handle = lammps_open_no_mpi(argc, argv, NULL);
|
||||
void *handle = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
@ -136,7 +136,7 @@ TEST(lammps_external, array)
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
void *handle = lammps_open_no_mpi(argc, argv, NULL);
|
||||
void *handle = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ using ::testing::StartsWith;
|
||||
TEST(lammps_open, null_args)
|
||||
{
|
||||
::testing::internal::CaptureStdout();
|
||||
void *handle = lammps_open(0, NULL, MPI_COMM_WORLD, NULL);
|
||||
void *handle = lammps_open(0, nullptr, MPI_COMM_WORLD, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
if (verbose) std::cout << output;
|
||||
@ -175,7 +175,7 @@ TEST(lammps_open_fortran, no_args)
|
||||
MPI_Comm_split(MPI_COMM_WORLD, 0, 1, &mycomm);
|
||||
int fcomm = MPI_Comm_c2f(mycomm);
|
||||
::testing::internal::CaptureStdout();
|
||||
void *handle = lammps_open_fortran(0, NULL, fcomm);
|
||||
void *handle = lammps_open_fortran(0, nullptr, fcomm);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
if (verbose) std::cout << output;
|
||||
|
||||
@ -23,8 +23,8 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
LibraryProperties(){};
|
||||
~LibraryProperties() override{};
|
||||
LibraryProperties() = default;
|
||||
~LibraryProperties() override = default;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
@ -36,7 +36,7 @@ protected:
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, NULL);
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
@ -436,8 +436,8 @@ class AtomProperties : public ::testing::Test {
|
||||
protected:
|
||||
void *lmp;
|
||||
|
||||
AtomProperties(){};
|
||||
~AtomProperties() override{};
|
||||
AtomProperties()= default;;
|
||||
~AtomProperties() override= default;;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
@ -447,7 +447,7 @@ protected:
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, NULL);
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
|
||||
@ -23,8 +23,8 @@ protected:
|
||||
void *lmp;
|
||||
std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER);
|
||||
|
||||
GatherProperties(){};
|
||||
~GatherProperties() override{};
|
||||
GatherProperties() = default;
|
||||
~GatherProperties() override = default;
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
@ -36,7 +36,7 @@ protected:
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, NULL);
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
std::string output = ::testing::internal::GetCapturedStdout();
|
||||
if (verbose) std::cout << output;
|
||||
EXPECT_THAT(output, StartsWith("LAMMPS ("));
|
||||
|
||||
Reference in New Issue
Block a user