[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Failures in test suite of FastML



On Thu, 2015-11-19 at 15:33 +0100, Andreas Tille wrote:

> I guess computeNJtreeJCmodel is a syntax error in the testing code -
> any help from a C++ programmer would be welcome to solve this.
In jcDistance.h there is a class jcDistance.OLD for which the
constructor takes one parameter. I guess the test was written for this
version of the class. 

> All other errors are kind of rounding errors which might (or might 
> not) be originated from running the test suite on a different 
> architecture and comparing with results which are similar but do not 
> really fit.  At least my naive non-biologists view on these 
> differences let me draw this conclusion - please correct me if I'm
> wrong.
Too me it looks exactly like this (in most cases). Andrew, Haim, I'd
like to suggest that instead of comparing output strings you might want
to implement your tests by using, e.g. BOOST.Test [1] or Google test
[2]. Those unit test systems provides macros that offers proper testing
of floating point values. For example with BOOST it goes like this:  

   BOOST_CHECK_CLOSE(value, expect, tolerance); 

(If you don't use anything else from BOOST than Google test is probably
the better alternative, since it is more lightweight). 

Best,  
Gert 


[1] http://www.boost.org/doc/libs/1_58_0/libs/test/doc/html/index.html
[2] https://github.com/google/googletest


Reply to: