Test framework for TrajectoryAnalysisModules.
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 23 May 2012 07:14:50 +0000 (10:14 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 6 Jul 2012 03:59:01 +0000 (05:59 +0200)
commitb9a48ab21d5634907845c400ae4241e017359f5b
treee9badb26efe21cb8a862ba846b574959cb90b729
parente0748eaca3f1e25001b4da92ac893ba17081d5a0
Test framework for TrajectoryAnalysisModules.

- Add a test fixture that makes it simple to test analysis tools that
  are implemented as TrajectoryAnalysisModule subclasses (moduletest.*).
- Add tests using the new fixture for most of the functionality of the
  Select module.
- Minor adjustment to reference data test fixture to make it more usable
  in this context.
- Move all dataset registration calls to trajectory analysis module
  constructors from initAnalysis().  Also moved static initialization of
  the datasets, in particular calls to setMultipoint().
  In addition to enabling the tests to access the datasets before any
  initialization of the module is done, this also makes the modules
  easier to use for other interfacing than the command-line runner.

Main part of #920, may need some additional features.

Change-Id: I67e123f8361fe7710e936d9b4a880e65a3dc89c5
20 files changed:
share/template/template.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
src/gromacs/trajectoryanalysis/tests/moduletest.cpp [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/moduletest.h [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_BasicTest.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_HandlesDumpOption.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_NormalizesSizes.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_WritesResidueIndices.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SelectModuleTest_WritesResidueNumbers.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/analysisdata-referencedata.xsl [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/common-referencedata.xsl [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/referencedata.xsl [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/select.cpp [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/simple.gro [new file with mode: 0644]
src/testutils/copy_xsl.sh
src/testutils/datatest.cpp
src/testutils/datatest.h