Yow,
Interesting. I fixed this, although I don't think there is a guarantee that a - a == 0.0 in C++.
I wouldn't use 0.0 thresholds...
Bas
On 24-May-2011, at 5:11 PM, SourceForge.net wrote:
> Bugs item #3306806, was opened at 2011-05-24 09:11
> Message generated for change (Tracker Item Submitted) made by nobody
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=968518&aid=3306806&group_id=199196
>
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: None
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Nobody/Anonymous (nobody)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: doubles_equal(x,x,0) should return TRUE
>
> Initial Comment:
> DOUBLES_EQUAL(x, x, 0.0) yields a test failure.
> Intuitively, one would assume that two equal numbers are always considered equal.
> Thus, the function doubles_equal() in Utest.cpp should compare with '<=' instead of '<':
> return PlatformSpecificFabs(d1 - d2) <= threshold;
>
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=968518&aid=3306806&group_id=199196
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Cpputest-developers mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cpputest-developers
|