Add unit tests for selection index mapping.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 28 Apr 2013 10:43:28 +0000 (13:43 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 17 Jun 2013 16:17:01 +0000 (18:17 +0200)
commit2504ba9a09e197fa34301b28a2f1c97935191c73
treeed3ec7e3a85df8f9d35704ce427a409445a2af58
parent6c31ffc46cf076b34bf77b440a9acc423a946a2b
Add unit tests for selection index mapping.

Add unit tests for parts of indexutil.* that are mainly used by the
selection position calculation engine.

Add required functionality to toputils.* and update typedefs.c to
support more flexible freeing of required data structures.

Part of #651, related to #1221.

Change-Id: Ibc68ad71a4834b991820014969be46152426a9f5
20 files changed:
src/gromacs/gmxlib/typedefs.c
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/tests/CMakeLists.txt
src/gromacs/selection/tests/indexutil.cpp [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesAtomBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesMoleculeBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesMoleculeBlockWithCompletion.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesResidueBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesResidueBlockWithCompletion.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesSingleBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexBlockTest_CreatesUnknownBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_HandlesMultipleRequests.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_InitializesAtomBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_InitializesMoleculeBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_MapsResidueBlocks.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_MapsResidueBlocksWithMask.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/IndexMapTest_MapsSingleBlock.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/referencedata.xsl
src/gromacs/selection/tests/toputils.cpp
src/gromacs/selection/tests/toputils.h