Update of /cvsroot/mockpp/mockpp/mockpp/constraint
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11398/mockpp/constraint
Modified Files:
IsCloseTo.h
Log Message:
wrong comparison on certain values
Index: IsCloseTo.h
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/IsCloseTo.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- IsCloseTo.h 6 Jan 2005 13:09:22 -0000 1.17
+++ IsCloseTo.h 14 Nov 2005 17:24:09 -0000 1.18
@@ -70,8 +70,8 @@
virtual bool eval( const NumberType &arg ) const
{
// don't use std::abs to better support user types
- return (arg < value + deviation && arg > value - deviation) // positive deviation
- || (arg < value - deviation && arg > value + deviation); // negative deviation
+ return (arg <= value + deviation && arg >= value - deviation) // positive deviation
+ || (arg <= value - deviation && arg >= value + deviation); // negative deviation
}
/** Appends the description of this object to the buffer.
|