Fix handling of real-valued 'to' selection ranges
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 20 May 2015 18:22:25 +0000 (21:22 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Wed, 20 May 2015 19:35:45 +0000 (22:35 +0300)
commit4124756a03b5d9e634d2384ae639a1732d76497a
treecccef06dc35cc34fa45dcec24e54fe065e91ec45
parentb48587d01cf3ad411b7b79eb4281bb0f8bf1c987
Fix handling of real-valued 'to' selection ranges

Two adjacent ranges were incorrectly merged to a single range if the
difference between their nearest endpoints was less than one (the extra
+1 in the code is incorrectly copy-pasted from the integer case).

Add tests for handling overlapping and near-overlapping ranges.

Fixes #1743.

Change-Id: I3ac79c55dc3817e6325e43e27e0ccb4fe360e609
src/gromacs/selection/params.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesOverlappingIntegerRanges.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesOverlappingRealRanges.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp