gdiplus: Some tests for GdipGetLineRect

Dan Kegel dank at kegel.com
Fri Feb 6 07:14:17 CST 2009


Nikolay Sivov <bunglehead at gmail.com> wrote:
> ...
> +    ok(rectf.X == 10.0, "Expected 10.0 got %.2f\n", rectf.X);

Exact equality comparison on float is never a good
idea in unit tests.  You need a range test instead.
See http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Floating-Point_Comparison



More information about the wine-devel mailing list