More selection unit tests for variables and fixes.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 16 Sep 2012 10:40:22 +0000 (13:40 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 3 Oct 2012 03:36:56 +0000 (05:36 +0200)
commit56006661a58a9c8687635e5e39e9cba8372ee745
tree7781dbe6ccf0554b95f7cf6da3d5124d8ae0c3ba
parent765fa723209c031203ecd54e98603fade087c455
More selection unit tests for variables and fixes.

- Added unit tests for more complex selections where either numeric or
  position values were assigned to variables.
- Fixed handling of subexpressions in these cases (will back-port to
  older branches separately).
- Added unit tests for constant expressions in variables (in particular
  constant positions were not handled right during initial development
  of selections).
- Added comments in the code for some parts that are currently
  unreachable.

Part of #651.

Change-Id: Ifbb585ca00fd7a9715b4c9cb004c3a895551c1a6
13 files changed:
src/gromacs/selection/compiler.cpp
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selelem.cpp
src/gromacs/selection/selmethod.cpp
src/gromacs/selection/sm_compare.cpp
src/gromacs/selection/sm_keywords.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesComplexNumericVariables.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesConstantPositionInVariable.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesNumericComparisons.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesNumericConstantsInVariables.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesPositionVariables.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp