Improve gmx::test::CommandLine.
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 24 May 2012 06:39:42 +0000 (09:39 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 24 May 2012 15:26:24 +0000 (18:26 +0300)
commitbccb1693d7b97d90802d6623a767046412839949
treef21c5464fc3049de12c29142ee5ab4e6d2a33fb9
parent691bc21df5eff47fbffd69da7c57d3e855711c60
Improve gmx::test::CommandLine.

- Make the class properly copyable for easier use in tests that need to
  manipulate it.
- Make the class manage its memory using std::vector and prevent memory
  leaks if the argv array is modified outside the class (the internal
  state of the class is still not correctly maintained, though).
- Add methods to append arguments.

Needed for #920, but split from the main change to keep it smaller.

Change-Id: I66ebe9d48936d35bce9e0b4fc1d6246d3d5ec07d
src/gromacs/commandline/tests/cmdlinemodulemanager.cpp
src/gromacs/commandline/tests/cmdlineparser.cpp
src/testutils/cmdlinetest.cpp
src/testutils/cmdlinetest.h