RFC: Richedit: Test Patch for EM_SETMARGINS
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Jan 17 02:07:04 CST 2011
James McKenzie <jjmckenzie51 at earthlink.net> wrote:
> + ok (16 == sentLogFontA.lfHeight, "Height not set to 12 for System Font. Height is %d\n", sentLogFontA.lfHeight);
12?
> + ok (96 == ry, "DPI for screen does not equal 96 it is %d\n", ry);
> + ok (-240 == CharFont1ANSI.yHeight /* Wine */|| 195 == CharFont1ANSI.yHeight /* Windows */, "y Height of System Character is "
> + "not -240 or 195 but is %d\n", CharFont1ANSI.yHeight);
> + ok (16 == abs(CharFont1ANSI.yHeight) * ry / 1440 /*Wine*/|| 13 == abs(CharFont1ANSI.yHeight) * ry / 1440 /*Windows*/, \
> + "Character Height of System character set is not 16 but %d\n", abs(CharFont1ANSI.yHeight) * ry / 1440);
> + ok (0 == CharFont1ANSI.yOffset, "Character Offset for System character set is not zero but %x\n", CharFont1ANSI.yOffset);
> + ok (7 == tma.tmAveCharWidth, "Average Character Width for System character set is %d\n", tma.tmAveCharWidth);
> + ok (15 == tma.tmMaxCharWidth /*Wine*/ || 14 == tma.tmMaxCharWidth /*Windows*/, "Maximum Character Width for System character set " \
> + "is %d\n", tma.tmMaxCharWidth);
Please use normal not reversed comparisons here and everywhere else, that
style improves nothing.
Also comments like /*Wine*/ and /*Windows*/ suggest that the tests deserve
at least a todo_wine around them.
Testing a return value of SendMessage() everywhere is also highly recommended
to make sure that the call really has any affect.
--
Dmitry.
More information about the wine-devel
mailing list