Author: sginsberg
Date: Tue Dec 16 12:41:26 2008
New Revision: 38124
URL:
http://svn.reactos.org/svn/reactos?rev=38124&view=rev
Log:
- Sync gdiplus Winetest too
Modified:
trunk/rostests/winetests/gdiplus/font.c
trunk/rostests/winetests/gdiplus/graphics.c
trunk/rostests/winetests/gdiplus/graphicspath.c
trunk/rostests/winetests/gdiplus/region.c
Modified: trunk/rostests/winetests/gdiplus/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/font.c?…
==============================================================================
--- trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] Tue Dec 16 12:41:26 2008
@@ -134,7 +134,7 @@
expect(0, lfw2.lfItalic);
expect(0, lfw2.lfUnderline);
expect(0, lfw2.lfStrikeOut);
- expect(0, lfw2.lfCharSet);
+ expect(GetTextCharset(hdc), lfw2.lfCharSet);
expect(0, lfw2.lfOutPrecision);
expect(0, lfw2.lfClipPrecision);
expect(0, lfw2.lfQuality);
@@ -164,7 +164,7 @@
expect(TRUE, lfw2.lfItalic);
expect(TRUE, lfw2.lfUnderline);
expect(TRUE, lfw2.lfStrikeOut);
- expect(0, lfw2.lfCharSet);
+ expect(GetTextCharset(hdc), lfw2.lfCharSet);
expect(0, lfw2.lfOutPrecision);
expect(0, lfw2.lfClipPrecision);
expect(0, lfw2.lfQuality);
Modified: trunk/rostests/winetests/gdiplus/graphics.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/graphic…
==============================================================================
--- trunk/rostests/winetests/gdiplus/graphics.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/graphics.c [iso-8859-1] Tue Dec 16 12:41:26 2008
@@ -485,6 +485,7 @@
GpRegion *clip;
INT i;
BOOL res;
+ ARGB color = 0x00000000;
pt[0].X = 10;
pt[0].Y = 10;
@@ -658,6 +659,8 @@
expect(ObjectBusy, status); status = Ok;
status = GdipGetInterpolationMode(graphics, &intmode);
expect(ObjectBusy, status); status = Ok;
+ status = GdipGetNearestColor(graphics, &color);
+ expect(ObjectBusy, status); status = Ok;
status = GdipGetPageScale(graphics, &r);
expect(ObjectBusy, status); status = Ok;
status = GdipGetPageUnit(graphics, &unit);
@@ -743,7 +746,6 @@
GdipDeleteBrush((GpBrush*)brush);
GdipDeleteRegion(region);
GdipDeleteMatrix(m);
- GdipDeleteRegion(region);
ReleaseDC(0, hdc);
}
Modified: trunk/rostests/winetests/gdiplus/graphicspath.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/graphic…
==============================================================================
--- trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] Tue Dec 16 12:41:26 2008
@@ -726,6 +726,15 @@
{23.3, 13.3, PathPointTypeBezier, 0, 0}, /*10*/
{30.0, 10.0, PathPointTypeBezier, 0, 0} /*11*/
};
+static path_test_t addcurve_path3[] = {
+ {10.0, 10.0, PathPointTypeStart, 0, 0}, /*0*/
+ {13.3, 16.7, PathPointTypeBezier, 0, 1}, /*1*/
+ {3.3, 20.0, PathPointTypeBezier, 0, 0}, /*2*/
+ {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*3*/
+ {16.7, 20.0, PathPointTypeBezier, 0, 0}, /*4*/
+ {23.3, 13.3, PathPointTypeBezier, 0, 0}, /*5*/
+ {30.0, 10.0, PathPointTypeBezier, 0, 0} /*6*/
+ };
static void test_addcurve(void)
{
GpStatus status;
@@ -765,6 +774,37 @@
status = GdipAddPathCurve2(path, points, 4, 1.0);
expect(Ok, status);
ok_path(path, addcurve_path2, sizeof(addcurve_path2)/sizeof(path_test_t), FALSE);
+
+ /* NULL args */
+ GdipResetPath(path);
+ status = GdipAddPathCurve3(NULL, NULL, 0, 0, 0, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, NULL, 0, 0, 0, 0.0);
+ expect(InvalidParameter, status);
+ /* wrong count, offset.. */
+ status = GdipAddPathCurve3(path, points, 0, 0, 0, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, points, 4, 0, 0, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, points, 4, 0, 4, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, points, 4, 1, 3, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, points, 4, 1, 0, 0.0);
+ expect(InvalidParameter, status);
+ status = GdipAddPathCurve3(path, points, 4, 3, 1, 0.0);
+ expect(InvalidParameter, status);
+
+ /* use all points */
+ status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0);
+ expect(Ok, status);
+ ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE);
+ GdipResetPath(path);
+
+ status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0);
+ expect(Ok, status);
+ ok_path(path, addcurve_path3, sizeof(addcurve_path3)/sizeof(path_test_t), FALSE);
+
GdipDeletePath(path);
}
Modified: trunk/rostests/winetests/gdiplus/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/region.…
==============================================================================
--- trunk/rostests/winetests/gdiplus/region.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/region.c [iso-8859-1] Tue Dec 16 12:41:26 2008
@@ -670,7 +670,6 @@
expect_magic((DWORD*)(buf + 2));
expect_dword(buf + 3, 0);
expect_dword(buf + 4, RGNDATA_INFINITE_RECT);
- GdipDeletePath(path);
GdipDeleteRegion(region2);
/* more complex case : replace with a combined region */