From f42a9e9a3ea32a359418957b43a612fc5bd8187d Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Thu, 30 Apr 2015 12:53:15 +0300 Subject: [PATCH] Avoid rounding errors affecting results in one test Change the input for one of 'gmx gangle' tests such that it does not produce angles that are exactly at an edge of the three-bin histogram used in the test. Rounding could affect the bin into which the angle was assigned to, causing the test to fail erroneously. Fixes #1716 Change-Id: I9979a8dfee0b870b3904fa28e274540f892f542d --- src/gromacs/trajectoryanalysis/tests/angle.cpp | 4 ++-- ...leTest_HandlesOneVsMultipleVectorGroupsAngles.xml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gromacs/trajectoryanalysis/tests/angle.cpp b/src/gromacs/trajectoryanalysis/tests/angle.cpp index 11c51d1f67..06f9af93ee 100644 --- a/src/gromacs/trajectoryanalysis/tests/angle.cpp +++ b/src/gromacs/trajectoryanalysis/tests/angle.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -190,7 +190,7 @@ TEST_F(AngleModuleTest, HandlesOneVsMultipleVectorGroupsAngles) "angle", "-g1", "vector", "-group1", - "resname RV1 and name A1 A2", + "resname RV2 and name A1 A2", "resname RV3 RV4 and name A1 A2", "-g2", "plane", "-group2", diff --git a/src/gromacs/trajectoryanalysis/tests/refdata/AngleModuleTest_HandlesOneVsMultipleVectorGroupsAngles.xml b/src/gromacs/trajectoryanalysis/tests/refdata/AngleModuleTest_HandlesOneVsMultipleVectorGroupsAngles.xml index 954ac5fb4e..26f0b5f1da 100644 --- a/src/gromacs/trajectoryanalysis/tests/refdata/AngleModuleTest_HandlesOneVsMultipleVectorGroupsAngles.xml +++ b/src/gromacs/trajectoryanalysis/tests/refdata/AngleModuleTest_HandlesOneVsMultipleVectorGroupsAngles.xml @@ -1,7 +1,7 @@ - angle -g1 vector -group1 'resname RV1 and name A1 A2' 'resname RV3 RV4 and name A1 A2' -g2 plane -group2 'resname RP1 RP2 and name A1 A2 A3' -binw 60 + angle -g1 vector -group1 'resname RV2 and name A1 A2' 'resname RV3 RV4 and name A1 A2' -g2 plane -group2 'resname RP1 RP2 and name A1 A2 A3' -binw 60 @@ -10,10 +10,10 @@ 2 0 - 90 + 180 - 120.00000000000001 + 45 @@ -34,7 +34,7 @@ 2 - 105 + 112.5 112.5 @@ -48,7 +48,7 @@ 2 - 0 + 0.0083333333333333332 0 @@ -62,7 +62,7 @@ 2 - 0.0083333333333333332 + 0 0 -- 2.22.0