<p dir="ltr">Hi,</p>
<p dir="ltr">There is no &quot;simple&quot; way using existing code to just test such files. It would require a complete parser for such files (and then one would also want to test, e.g., the legends at the beginning of xvg files), which is certainly doable, but will be a lot of code.</p>
<p dir="ltr">The approach used in the trajectoryanalysis tests is to test the data only before it is written into a file. If your code used the analysisdata classes for producing output (which could be useful otherwise as well, including some enforced modularization), then you could just reuse this mechanism, but probably that also requires you to change your code quite a bit.</p>
<p dir="ltr">Best regards,<br>
Teemu<br>
</p>
<p dir="ltr"><br>
On Fri, Jul 24, 2015, 09:50 David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br>
</p>
<p dir="ltr"><br>
</p>
<blockquote><p dir="ltr">I&#39;m trying to write a test for the output files generated in my energy<br>
patch. However, the checkOutputfiles() compares files as blocks of<br>
strings, which is not useful for floating point numbers. Is there a<br>
simple way of testing such files as a bunch of numbers with a tolerance?</p>
</blockquote>
<blockquote><p dir="ltr"><br>
I looked in the trajectoryanalysis/tests but did not find anything<br>
helpful there (or did not comprehend what is being done).</p>
</blockquote>
<blockquote><p dir="ltr"><br>
</p>
</blockquote>
<p dir="ltr"><br>
</p>