Laurent Vromman : gdi32: Correct a test where the tested function was not called.
Alexandre Julliard
julliard at winehq.org
Wed Nov 7 06:45:55 CST 2007
Module: wine
Branch: master
Commit: 52f769e88d0ee2c22e55ea6bb1b327e48ce823da
URL: http://source.winehq.org/git/wine.git/?a=commit;h=52f769e88d0ee2c22e55ea6bb1b327e48ce823da
Author: Laurent Vromman <laurent at vromman.org>
Date: Tue Nov 6 01:37:15 2007 +0100
gdi32: Correct a test where the tested function was not called.
---
dlls/gdi32/path.c | 5 -----
dlls/gdi32/tests/path.c | 5 +++--
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c
index 553f475..a8977eb 100644
--- a/dlls/gdi32/path.c
+++ b/dlls/gdi32/path.c
@@ -1901,11 +1901,6 @@ static BOOL PATH_WidenPath(DC *dc)
return FALSE;
}
- /* pen width must be strictly higher than 1 */
- if(penWidth == 1) {
- return TRUE;
- }
-
penWidthIn = penWidth / 2;
penWidthOut = penWidth / 2;
if(penWidthIn + penWidthOut < penWidth)
diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c
index 6753298..cbbd53c 100644
--- a/dlls/gdi32/tests/path.c
+++ b/dlls/gdi32/tests/path.c
@@ -83,14 +83,15 @@ static void test_widenpath(void)
AbortPath(hdc);
- /* Test when the pen width is equal to 1. The path should not change */
+ /* Test when the pen width is equal to 1. The path should change too */
narrowPen = CreatePen(PS_SOLID, 1, RGB(0,0,0));
oldPen = SelectObject(hdc, narrowPen);
BeginPath(hdc);
Polyline(hdc, pnt, 6);
EndPath(hdc);
+ ret = WidenPath(hdc);
nSize = GetPath(hdc, NULL, NULL, 0);
- ok(nSize == 6, "WidenPath fails detecting 1px wide pen. Path length is %d, should be 6\n", nSize);
+ ok(nSize > 6, "WidenPath should compute a widdened path with a 1px wide pen. Path length is %d, should be more than 6\n", nSize);
ReleaseDC(0, hdc);
return;
More information about the wine-cvs
mailing list