Correctly build argv with nullptr at the end
This commit is contained in:
committed by
Richard Berger
parent
e655cda066
commit
46768d0ff3
@ -32,10 +32,11 @@ protected:
|
||||
{
|
||||
const char *args[] = {"LAMMPS_test", "-log", "none",
|
||||
"-echo", "screen", "-nocite",
|
||||
"-var", "input_dir", STRINGIFY(TEST_INPUT_FOLDER)};
|
||||
"-var", "input_dir", STRINGIFY(TEST_INPUT_FOLDER),
|
||||
nullptr};
|
||||
|
||||
char **argv = (char **)args;
|
||||
int argc = sizeof(args) / sizeof(char *);
|
||||
int argc = (sizeof(args) / sizeof(char *)) - 1;
|
||||
|
||||
::testing::internal::CaptureStdout();
|
||||
lmp = lammps_open_no_mpi(argc, argv, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user