Correctly build argv with nullptr at the end
This commit is contained in:
committed by
Richard Berger
parent
e655cda066
commit
46768d0ff3
@ -33,11 +33,9 @@ protected:
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
const char *args[] = {testbinary, "-log", "none", "-echo", "screen", "-nocite"};
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
LAMMPS::argv args = {testbinary, "-log", "none", "-echo", "screen", "-nocite"};
|
||||
if (!verbose) ::testing::internal::CaptureStdout();
|
||||
lmp = new LAMMPS(argc, argv, MPI_COMM_WORLD);
|
||||
lmp = new LAMMPS(args, MPI_COMM_WORLD);
|
||||
InitSystem();
|
||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user