[gmx-developers] TestReferenceChecker and floatin problem
Mark Abraham
mark.j.abraham at gmail.com
Sat Jan 7 23:52:33 CET 2017
Hi,
You're using rootChecker like it was a getter method for an already
allocated object, but it is a factory for objects. Call it once and keep
the return value in a variable for use each time.
Would naming it makeRootChecker have helped you understand that you don't
want to call it more often than you intend to make a new checker?
Mark
On Sat, 7 Jan 2017 21:54 David van der Spoel <spoel at xray.bmc.uu.se> wrote:
> Hi,
> I'm trying to finalize some test code in my energy patch but getting
> stuck on not being able to change the tolerance. The problem is I'm
> using CommandLineTestBase as a base class, which has a function
> checkOutputFiles. The files are checked but I can not seem to modulate
> the floatingpointtolerance.
>
> E.g. when calling
>
>
> rootChecker().setDefaultTolerance(gmx::test::relativeToleranceAsFloatingPoint(1,
> tolerance));
>
> a fresh rootChecker is generateed for every call since in refdata.h we have
>
> * Each call returns an independent instance.
> */
> TestReferenceChecker rootChecker();
>
> That means that by the time my code calls checkOutputFiles the tolerance
> settings are reset.
>
> Clues?
>
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
> spoel at xray.bmc.uu.se http://folding.bmc.uu.se
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20170107/eed01173/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list