Author: tkreuzer
Date: Sat May 5 12:21:56 2012
New Revision: 56509
URL:
http://svn.reactos.org/svn/reactos?rev=56509&view=rev
Log:
[GDI32_APITEST]
- Comment out tests that fail on windows 2003
- Try to fix a number of tests for Windows 2003
Modified:
trunk/rostests/apitests/gdi32/CombineRgn.c
trunk/rostests/apitests/gdi32/CombineTransform.c
trunk/rostests/apitests/gdi32/CreateBitmap.c
trunk/rostests/apitests/gdi32/CreateBitmapIndirect.c
Modified: trunk/rostests/apitests/gdi32/CombineRgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CombineRgn…
==============================================================================
--- trunk/rostests/apitests/gdi32/CombineRgn.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/CombineRgn.c [iso-8859-1] Sat May 5 12:21:56 2012
@@ -21,7 +21,7 @@
ok_long(CombineRgn(NULL, NULL, NULL, 0), ERROR);
ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, 0), ERROR);
ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, 6), ERROR);
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_PARAMETER),
"wrong error: %ld\n", GetLastError());
}
@@ -38,7 +38,7 @@
ok_long(CombineRgn(NULL, hrgn1, NULL, RGN_COPY), ERROR);
ok_long(CombineRgn(NULL, NULL, hrgn1, RGN_COPY), ERROR);
ok_long(CombineRgn(NULL, hrgn1, hrgn2, RGN_COPY), ERROR);
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_HANDLE),
"wrong error: %ld\n", GetLastError());
ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, RGN_COPY), SIMPLEREGION);
ok(EqualRgn(hrgn1, hrgn2), "Region is not correct\n");
@@ -58,7 +58,7 @@
ok_long(CombineRgn(hrgn1, NULL, NULL, RGN_COPY), ERROR);
ok(EqualRgn(hrgn1, hrgn3), "Region is not correct\n");
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_HANDLE),
"wrong error: %ld\n", GetLastError());
}
@@ -77,7 +77,7 @@
ok_long(CombineRgn(hrgn1, NULL, hrgn2, RGN_AND), ERROR);
ok_long(CombineRgn(hrgn1, GetStockObject(BLACK_PEN), hrgn2, RGN_AND), ERROR);
ok_long(CombineRgn(hrgn1, hrgn2, GetStockObject(BLACK_PEN), RGN_AND), ERROR);
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_HANDLE),
"wrong error: %ld\n", GetLastError());
ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, RGN_AND), SIMPLEREGION);
@@ -152,7 +152,7 @@
ok_long(CombineRgn(hrgn1, NULL, hrgn2, RGN_DIFF), ERROR);
ok_long(CombineRgn(hrgn1, GetStockObject(BLACK_PEN), hrgn2, RGN_DIFF), ERROR);
ok_long(CombineRgn(hrgn1, hrgn2, GetStockObject(BLACK_PEN), RGN_DIFF), ERROR);
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_HANDLE),
"wrong error: %ld\n", GetLastError());
ok_long(CombineRgn(hrgn1, hrgn1, hrgn1, RGN_DIFF), NULLREGION);
ok_long(CombineRgn(hrgn1, hrgn2, hrgn2, RGN_DIFF), NULLREGION);
@@ -182,7 +182,7 @@
ok_long(CombineRgn(hrgn1, NULL, hrgn2, RGN_XOR), ERROR);
ok_long(CombineRgn(hrgn1, GetStockObject(BLACK_PEN), hrgn2, RGN_XOR), ERROR);
ok_long(CombineRgn(hrgn1, hrgn2, GetStockObject(BLACK_PEN), RGN_XOR), ERROR);
- ok_long(GetLastError(), 0xbadbabe);
+ ok((GetLastError() == 0xbadbabe) || (GetLastError() == ERROR_INVALID_HANDLE),
"wrong error: %ld\n", GetLastError());
ok_long(CombineRgn(hrgn1, hrgn2, hrgn3, RGN_XOR), COMPLEXREGION);
ok_long(CombineRgn(hrgn4, hrgn2, hrgn3, RGN_OR), COMPLEXREGION);
Modified: trunk/rostests/apitests/gdi32/CombineTransform.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CombineTra…
==============================================================================
--- trunk/rostests/apitests/gdi32/CombineTransform.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/CombineTransform.c [iso-8859-1] Sat May 5 12:21:56
2012
@@ -19,9 +19,13 @@
#define ok_flt(x, y) \
{ \
FLT_LONG __x, __y; \
- __x.e = (x); \
- __y.e = (y); \
- ok(__x.l == __y.l, "Wrong value for " #x ", expected " #y "
(%f), got %f\n", (double)(y), (double)(x)); \
+ __x.e = (x); \
+ __y.e = (y); \
+ if (_isnan(y)) {\
+ ok((__x.l == __y.l) || (__x.l == 0), "Wrong value for " #x ",
expected " #y " (%f), got %f\n", (double)(y), (double)(x)); \
+ } else {\
+ ok(__x.l == __y.l, "Wrong value for " #x ", expected " #y
" (%f), got %f\n", (double)(y), (double)(x)); \
+ } \
}
#define ok_xform(xform, m11, m12, m21, m22, dx, dy) \
@@ -122,33 +126,33 @@
set_xform(&xform1, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
set_xform(&xform2, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
set_xform(&xform3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- xform1.eDx = 4294967167.999999761;
+ xform1.eDx = (FLOAT)4294967167.999999761;
ok(xform1.eDx == 4294967040.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok(ret == 1, "expected ret = 1, got %d\n", ret);
ok_xform(xform3, 1.0, 0.0, 0.0, 1.0, 4294967040.0, 0.0);
set_xform(&xform3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- xform1.eDx = 4294967167.999999762;
+ xform1.eDx = (FLOAT)4294967167.999999762;
ok(xform1.eDx == 4294967296.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 0);
ok_int(GetLastError(), ERROR_SUCCESS);
ok_xform(xform3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- xform1.eDx = -4294967167.999999761;
+ xform1.eDx = (FLOAT)-4294967167.999999761;
ok(xform1.eDx == -4294967040.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 1);
- xform1.eDx = -4294967167.999999762;
+ xform1.eDx = (FLOAT)-4294967167.999999762;
ok(xform1.eDx == -4294967296.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 0);
ok_int(GetLastError(), ERROR_SUCCESS);
xform1.eDx = 0;
- xform1.eDy = 4294967167.999999761;
+ xform1.eDy = (FLOAT)4294967167.999999761;
ok(xform1.eDy == 4294967040.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 1);
@@ -158,18 +162,18 @@
ok_int(ret, 1);
ok_flt(xform3.eDy, 4294967040.0);
- xform1.eDy = 4294967167.999999762;
+ xform1.eDy = (FLOAT)4294967167.999999762;
ok(xform1.eDy == 4294967296.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 0);
ok_int(GetLastError(), ERROR_SUCCESS);
- xform1.eDy = -4294967167.999999761;
+ xform1.eDy = (FLOAT)-4294967167.999999761;
ok(xform1.eDy == -4294967040.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 1);
- xform1.eDy = -4294967167.999999762;
+ xform1.eDy = (FLOAT)-4294967167.999999762;
ok(xform1.eDy == -4294967296.0, "float rounding error.\n");
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 0);
@@ -180,7 +184,7 @@
ok_int(ret, 1);
set_xform(&xform1, 1000.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- xform1.eDx = -4294967167.999999762;
+ xform1.eDx = (FLOAT)-4294967167.999999762;
xform2.eM11 = 1000.0;
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 0);
@@ -207,18 +211,18 @@
ok_xform(xform3, geIND, geIND, geINF, geINF, 0.0, 0.0);
ok_int(GetLastError(), ERROR_SUCCESS);
- set_xform(&xform1, 18446743500000000000.0, 0.0, 1.0, 0.0, 0.0, 0.0);
+ set_xform(&xform1, (FLOAT)18446743500000000000.0, 0.0, 1.0, 0.0, 0.0, 0.0);
xform2 = xform1;
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 1);
ok_flt(xform3.eM11, 340282326356119260000000000000000000000.0);
- xform1.eM11 = 18446745000000000000.0;
+ xform1.eM11 = (FLOAT)18446745000000000000.0;
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_int(ret, 1);
ok_flt(xform3.eM11, 340282346638528860000000000000000000000.0);
- xform1.eM11 = 18446746000000000000.0;
+ xform1.eM11 = (FLOAT)18446746000000000000.0;
ret = CombineTransform(&xform3, &xform1, &xform2);
ok_long(*(DWORD*)&xform3.eM11, 0x7f800000);
Modified: trunk/rostests/apitests/gdi32/CreateBitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CreateBitm…
==============================================================================
--- trunk/rostests/apitests/gdi32/CreateBitmap.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/CreateBitmap.c [iso-8859-1] Sat May 5 12:21:56 2012
@@ -66,7 +66,7 @@
/* Check for maximum height */
hbmp = CreateBitmap(1, 0x1FFFFF00, 1, 1, NULL);
- ok(hbmp != 0, "\n");
+ //ok(hbmp != 0, "\n"); // fails on windows 2003
DeleteObject(hbmp);
SetLastError(0);
hbmp = CreateBitmap(1, 0x1FFFFFFF, 1, 1, NULL);
@@ -75,7 +75,7 @@
/* Check for overflow in width * height */
hbmp = CreateBitmap(0x20000, 0x1FFFF, 1, 1, NULL);
- ok(hbmp != 0, "\n");
+ //ok(hbmp != 0, "\n"); // fails on windows 2003
DeleteObject(hbmp);
SetLastError(0);
hbmp = CreateBitmap(0x20000, 0x20000, 1, 1, NULL);
Modified: trunk/rostests/apitests/gdi32/CreateBitmapIndirect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CreateBitm…
==============================================================================
--- trunk/rostests/apitests/gdi32/CreateBitmapIndirect.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/gdi32/CreateBitmapIndirect.c [iso-8859-1] Sat May 5 12:21:56
2012
@@ -68,7 +68,7 @@
win_bitmap.bmWidth = 0x8000;
win_bitmap.bmWidthBytes = win_bitmap.bmWidth;
win_hBmp = CreateBitmapIndirect(&win_bitmap);
- ok(win_hBmp != 0, "CreateBitmapIndirect failed\n");
+ //ok(win_hBmp != 0, "CreateBitmapIndirect failed\n"); // fails on win 2003
DeleteObject(win_hBmp);
}