24 Jun
2010
24 Jun
'10
4:44 a.m.
Misha wrote: + /* comparisons of 0.0f with -0.0f do not quite seem to work correctly */ Boy, that's for sure. + todo_wine ok( vertex_data[i].x==test_vertex_data[i].x || (fabsf(vertex_data[i].x) < 0.0001f && fabsf(test_vertex_data[i].x) < 0.0001f), "Got result %f, expected %f\n",vertex_data[i].x,test_vertex_data[i].x); You probably want to define an AlmostEqual() function and use that rather than repeating the logic. See http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Floating-Po... and the paper it points to, http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - Dan