Commit 5c637c22 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

gdi32/tests: Enable compilation with long types.

parent 842452d4
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = gdi32.dll
IMPORTS = setupapi user32 gdi32 advapi32
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -132,19 +132,19 @@ static void verify_region(HRGN hrgn, const RECT *rc)
ret = GetRegionData(hrgn, 0, NULL);
if (IsRectEmpty(rc))
ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", ret);
ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %lu\n", ret);
else
ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret);
ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %lu\n", ret);
if (!ret) return;
ret = GetRegionData(hrgn, sizeof(rgn), &rgn.data);
if (IsRectEmpty(rc))
ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", ret);
ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %lu\n", ret);
else
ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret);
ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %lu\n", ret);
trace("size %u, type %u, count %u, rgn size %u, bound %s\n",
trace("size %lu, type %lu, count %lu, rgn size %lu, bound %s\n",
rgn.data.rdh.dwSize, rgn.data.rdh.iType, rgn.data.rdh.nCount, rgn.data.rdh.nRgnSize,
wine_dbgstr_rect(&rgn.data.rdh.rcBound));
if (rgn.data.rdh.nCount != 0)
......@@ -154,21 +154,21 @@ static void verify_region(HRGN hrgn, const RECT *rc)
ok(EqualRect(rect, rc), "rects don't match\n");
}
ok(rgn.data.rdh.dwSize == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", rgn.data.rdh.dwSize);
ok(rgn.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn.data.rdh.iType);
ok(rgn.data.rdh.dwSize == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %lu\n", rgn.data.rdh.dwSize);
ok(rgn.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %lu\n", rgn.data.rdh.iType);
if (IsRectEmpty(rc))
{
ok(rgn.data.rdh.nCount == 0, "expected 0, got %u\n", rgn.data.rdh.nCount);
ok(rgn.data.rdh.nCount == 0, "expected 0, got %lu\n", rgn.data.rdh.nCount);
ok(rgn.data.rdh.nRgnSize == 0 ||
broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */
"expected 0, got %u\n", rgn.data.rdh.nRgnSize);
"expected 0, got %lu\n", rgn.data.rdh.nRgnSize);
}
else
{
ok(rgn.data.rdh.nCount == 1, "expected 1, got %u\n", rgn.data.rdh.nCount);
ok(rgn.data.rdh.nCount == 1, "expected 1, got %lu\n", rgn.data.rdh.nCount);
ok(rgn.data.rdh.nRgnSize == sizeof(RECT) ||
broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */
"expected sizeof(RECT), got %u\n", rgn.data.rdh.nRgnSize);
"expected sizeof(RECT), got %lu\n", rgn.data.rdh.nRgnSize);
}
ok(EqualRect(&rgn.data.rdh.rcBound, rc), "rects don't match\n");
}
......@@ -190,7 +190,7 @@ static void test_ExtCreateRegion(void)
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, 0, NULL);
ok(!hrgn, "ExtCreateRegion should fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
rgn.data.rdh.dwSize = 0;
rgn.data.rdh.iType = 0;
......@@ -202,14 +202,14 @@ static void test_ExtCreateRegion(void)
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
ok(!hrgn, "ExtCreateRegion should fail\n");
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %lu\n", GetLastError());
rgn.data.rdh.dwSize = sizeof(rgn.data.rdh) - 1;
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
ok(!hrgn, "ExtCreateRegion should fail\n");
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %lu\n", GetLastError());
/* although XP doesn't care about the type Win9x does */
rgn.data.rdh.iType = RDH_RECTANGLES;
......@@ -218,7 +218,7 @@ static void test_ExtCreateRegion(void)
/* sizeof(RGNDATAHEADER) is large enough */
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError());
ok(hrgn != 0, "ExtCreateRegion error %lu\n", GetLastError());
verify_region(hrgn, &empty_rect);
DeleteObject(hrgn);
......@@ -229,11 +229,11 @@ static void test_ExtCreateRegion(void)
ok(!hrgn, "ExtCreateRegion should fail\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
broken(GetLastError() == 0xdeadbeef), "0xdeadbeef, got %u\n", GetLastError());
broken(GetLastError() == 0xdeadbeef), "0xdeadbeef, got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError());
ok(hrgn != 0, "ExtCreateRegion error %lu\n", GetLastError());
verify_region(hrgn, &empty_rect);
DeleteObject(hrgn);
......@@ -243,7 +243,7 @@ static void test_ExtCreateRegion(void)
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError());
ok(hrgn != 0, "ExtCreateRegion error %lu\n", GetLastError());
verify_region(hrgn, &rc);
DeleteObject(hrgn);
......@@ -256,7 +256,7 @@ static void test_ExtCreateRegion(void)
SetLastError(0xdeadbeef);
hrgn = ExtCreateRegion(&xform, sizeof(rgn), &rgn.data);
ok(hrgn != 0, "ExtCreateRegion error %u/%x\n", GetLastError(), GetLastError());
ok(hrgn != 0, "ExtCreateRegion error %lu/%lx\n", GetLastError(), GetLastError());
verify_region(hrgn, &rc_xformed);
DeleteObject(hrgn);
......@@ -269,7 +269,7 @@ static void test_ExtCreateRegion(void)
hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + 2 * sizeof(RECT) - 1, &rgn.data);
todo_wine
ok(!hrgn, "ExtCreateRegion should fail\n");
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %lu\n", GetLastError());
}
......
......@@ -47,41 +47,41 @@ static void test_gdi_objects(void)
SetLastError(0);
hp = SelectObject(NULL, GetStockObject(BLACK_PEN));
ok(!hp && (GetLastError() == ERROR_INVALID_HANDLE || broken(!GetLastError())),
"SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, %u\n",
"SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, %lu\n",
hp, GetLastError());
/* With a valid DC and a NULL object, the call returns 0 but does not SetLastError() */
SetLastError(0);
hp = SelectObject(hdc, NULL);
ok(!hp && !GetLastError(),
"SelectObject(NULL obj) expected 0, NO_ERROR, got %p, %u\n",
"SelectObject(NULL obj) expected 0, NO_ERROR, got %p, %lu\n",
hp, GetLastError());
/* The DC is unaffected by the NULL SelectObject */
SetLastError(0);
hp = SelectObject(hdc, GetStockObject(BLACK_PEN));
ok(hp && !GetLastError(),
"SelectObject(post NULL) expected non-null, NO_ERROR, got %p, %u\n",
"SelectObject(post NULL) expected non-null, NO_ERROR, got %p, %lu\n",
hp, GetLastError());
/* GetCurrentObject does not SetLastError() on a null object */
SetLastError(0);
hp = GetCurrentObject(NULL, OBJ_PEN);
ok(!hp && !GetLastError(),
"GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, %u\n",
"GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, %lu\n",
hp, GetLastError());
/* DeleteObject does not SetLastError() on a null object */
ret = DeleteObject(NULL);
ok( !ret && !GetLastError(),
"DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n",
"DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
ret, GetLastError());
/* GetObject does not SetLastError() on a null object */
SetLastError(0);
i = GetObjectA(NULL, sizeof(buff), buff);
ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_INVALID_PARAMETER),
"GetObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n",
"GetObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
i, GetLastError());
/* GetObject expects ERROR_NOACCESS when passed an invalid buffer */
......@@ -89,21 +89,21 @@ static void test_gdi_objects(void)
SetLastError(0);
i = GetObjectA(hp, (INT_PTR)buff, (LPVOID)sizeof(buff));
ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_NOACCESS),
"GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %u\n",
"GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %lu\n",
i, GetLastError());
/* GetObjectType does SetLastError() on a null object */
SetLastError(0);
i = GetObjectType(NULL);
ok (!i && GetLastError() == ERROR_INVALID_HANDLE,
"GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, %u\n",
"GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, %lu\n",
i, GetLastError());
/* UnrealizeObject does not SetLastError() on a null object */
SetLastError(0);
i = UnrealizeObject(NULL);
ok (!i && !GetLastError(),
"UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n",
"UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
i, GetLastError());
ReleaseDC(NULL, hdc);
......@@ -125,7 +125,7 @@ static DWORD WINAPI thread_proc(void *param)
struct hgdiobj_event *hgdiobj_event = param;
hgdiobj_event->hdc = CreateDCA("display", NULL, NULL, NULL);
ok(hgdiobj_event->hdc != NULL, "CreateDC error %u\n", GetLastError());
ok(hgdiobj_event->hdc != NULL, "CreateDC error %lu\n", GetLastError());
hgdiobj_event->hgdiobj1 = CreatePen(PS_DASHDOTDOT, 17, RGB(1, 2, 3));
ok(hgdiobj_event->hgdiobj1 != 0, "Failed to create pen\n");
......@@ -135,7 +135,7 @@ static DWORD WINAPI thread_proc(void *param)
SetEvent(hgdiobj_event->ready_event);
status = WaitForSingleObject(hgdiobj_event->stop_event, INFINITE);
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError());
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
ok(!GetObjectA(hgdiobj_event->hgdiobj1, sizeof(lp), &lp), "GetObject should fail\n");
......@@ -155,43 +155,43 @@ static void test_thread_objects(void)
BOOL bRet;
hgdiobj_event.stop_event = CreateEventA(NULL, 0, 0, NULL);
ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %u\n", GetLastError());
ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %lu\n", GetLastError());
hgdiobj_event.ready_event = CreateEventA(NULL, 0, 0, NULL);
ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %u\n", GetLastError());
ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %lu\n", GetLastError());
hthread = CreateThread(NULL, 0, thread_proc, &hgdiobj_event, 0, &tid);
ok(hthread != NULL, "CreateThread error %u\n", GetLastError());
ok(hthread != NULL, "CreateThread error %lu\n", GetLastError());
status = WaitForSingleObject(hgdiobj_event.ready_event, INFINITE);
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError());
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
ret = GetObjectA(hgdiobj_event.hgdiobj1, sizeof(lp), &lp);
ok(ret == sizeof(lp), "GetObject error %u\n", GetLastError());
ok(ret == sizeof(lp), "GetObject error %lu\n", GetLastError());
ok(lp.lopnStyle == PS_DASHDOTDOT, "wrong pen style %d\n", lp.lopnStyle);
ok(lp.lopnWidth.x == 17, "wrong pen width.y %d\n", lp.lopnWidth.x);
ok(lp.lopnWidth.y == 0, "wrong pen width.y %d\n", lp.lopnWidth.y);
ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08x\n", lp.lopnColor);
ok(lp.lopnWidth.x == 17, "wrong pen width.y %ld\n", lp.lopnWidth.x);
ok(lp.lopnWidth.y == 0, "wrong pen width.y %ld\n", lp.lopnWidth.y);
ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08lx\n", lp.lopnColor);
ret = GetDeviceCaps(hgdiobj_event.hdc, TECHNOLOGY);
ok(ret == DT_RASDISPLAY, "GetDeviceCaps(TECHNOLOGY) should return DT_RASDISPLAY not %d\n", ret);
bRet = DeleteObject(hgdiobj_event.hgdiobj1);
ok(bRet, "DeleteObject error %u\n", GetLastError());
ok(bRet, "DeleteObject error %lu\n", GetLastError());
bRet = DeleteDC(hgdiobj_event.hdc);
ok(bRet, "DeleteDC error %u\n", GetLastError());
ok(bRet, "DeleteDC error %lu\n", GetLastError());
type = GetObjectType(hgdiobj_event.hgdiobj2);
ok(type == OBJ_REGION, "GetObjectType returned %u\n", type);
ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type);
SetEvent(hgdiobj_event.stop_event);
status = WaitForSingleObject(hthread, INFINITE);
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError());
ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
CloseHandle(hthread);
type = GetObjectType(hgdiobj_event.hgdiobj2);
ok(type == OBJ_REGION, "GetObjectType returned %u\n", type);
ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type);
bRet = DeleteObject(hgdiobj_event.hgdiobj2);
ok(bRet, "DeleteObject error %u\n", GetLastError());
ok(bRet, "DeleteObject error %lu\n", GetLastError());
CloseHandle(hgdiobj_event.stop_event);
CloseHandle(hgdiobj_event.ready_event);
......@@ -216,7 +216,7 @@ static void test_GetCurrentObject(void)
assert(hdc != 0);
type = GetObjectType(hdc);
ok(type == OBJ_MEMDC, "GetObjectType returned %u\n", type);
ok(type == OBJ_MEMDC, "GetObjectType returned %lu\n", type);
hpen = CreatePen(PS_SOLID, 10, RGB(10, 20, 30));
assert(hpen != 0);
......@@ -354,9 +354,9 @@ static void test_handles_on_win64(void)
hrgn_test = (HRGN)(ULONG_PTR)((ULONG_PTR)hrgn | ((ULONGLONG)cases[i].high << 32) | cases[i].low);
type = GetObjectType( hrgn_test );
if (cases[i].ret)
ok( type == OBJ_REGION, "wrong type %u\n", type );
ok( type == OBJ_REGION, "wrong type %lu\n", type );
else
ok( type == 0, "wrong type %u\n", type );
ok( type == 0, "wrong type %lu\n", type );
ret = DeleteObject(hrgn_test);
ok( cases[i].ret == ret, "DeleteObject should return %s (%p)\n",
cases[i].ret ? "TRUE" : "FALSE", hrgn_test);
......@@ -430,7 +430,7 @@ static void test_shared_handle_table(void)
handle = HandleToULong( hrgn );
entry = &gdi_shared->Handles[handle & 0xffff];
todo_wine
ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %x\n",
ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %lx\n",
entry->Owner.ProcessId, GetCurrentProcessId());
test_shared_handle_entry( hrgn, NTGDI_OBJ_REGION, FALSE );
......@@ -442,7 +442,7 @@ static void test_shared_handle_table(void)
ok(entry->Type == 4, "Type = %x\n", entry->Type);
ok(entry->Object, "Object = NULL\n");
todo_wine
ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %x\n",
ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %lx\n",
entry->Owner.ProcessId, GetCurrentProcessId());
ok(entry->Owner.Count == 0, "Count = %u\n", entry->Owner.Count);
......@@ -465,7 +465,7 @@ static void test_shared_handle_table(void)
test_shared_handle_entry( GetStockObject( STOCK_LAST + 1 ), NTGDI_OBJ_BITMAP, TRUE );
dc = CreateDCW(L"display", NULL, NULL, NULL);
ok(GetObjectType(dc) == OBJ_DC, "GetObjectType(dc) = %x\n", GetObjectType(dc));
ok(GetObjectType(dc) == OBJ_DC, "GetObjectType(dc) = %lx\n", GetObjectType(dc));
test_shared_handle_entry( dc, NTGDI_OBJ_DC, FALSE );
DeleteDC(dc);
......
......@@ -48,12 +48,12 @@ static void test_GetICMProfileA( HDC dc )
size = MAX_PATH;
ret = GetICMProfileA( dc, &size, NULL );
ok( !ret, "GetICMProfileA succeeded\n" );
ok( size > 0, "got %u\n", size );
ok( size > 0, "got %lu\n", size );
size = 0;
ret = GetICMProfileA( dc, &size, NULL );
ok( !ret, "GetICMProfileA succeeded\n" );
ok( size > 0, "got %u\n", size );
ok( size > 0, "got %lu\n", size );
size = MAX_PATH;
ret = GetICMProfileA( NULL, &size, filename );
......@@ -67,14 +67,14 @@ static void test_GetICMProfileA( HDC dc )
ok( !ret, "GetICMProfileA succeeded\n" );
ok( size, "expected size > 0\n" );
ok( filename[0] == 0, "Expected filename to be empty\n" );
ok( error == ERROR_INSUFFICIENT_BUFFER, "got %d, expected ERROR_INSUFFICIENT_BUFFER\n", error );
ok( error == ERROR_INSUFFICIENT_BUFFER, "got %ld, expected ERROR_INSUFFICIENT_BUFFER\n", error );
ret = GetICMProfileA( dc, NULL, filename );
ok( !ret, "GetICMProfileA succeeded\n" );
size = MAX_PATH;
ret = GetICMProfileA( dc, &size, filename );
ok( ret, "GetICMProfileA failed %d\n", GetLastError() );
ok( ret, "GetICMProfileA failed %ld\n", GetLastError() );
trace( "%s\n", filename );
}
......@@ -102,7 +102,7 @@ static void test_GetICMProfileW( HDC dc )
/* Vista crashes */
size = MAX_PATH;
ret = GetICMProfileW( dc, &size, NULL );
ok( ret, "GetICMProfileW failed %d\n", GetLastError() );
ok( ret, "GetICMProfileW failed %ld\n", GetLastError() );
}
ret = GetICMProfileW( dc, NULL, filename );
......@@ -115,7 +115,7 @@ static void test_GetICMProfileW( HDC dc )
size = 0;
ret = GetICMProfileW( dc, &size, NULL );
ok( !ret, "GetICMProfileW succeeded\n" );
ok( size > 0, "got %u\n", size );
ok( size > 0, "got %lu\n", size );
size = 0;
SetLastError(0xdeadbeef);
......@@ -123,11 +123,11 @@ static void test_GetICMProfileW( HDC dc )
error = GetLastError();
ok( !ret, "GetICMProfileW succeeded\n" );
ok( size, "expected size > 0\n" );
ok( error == ERROR_INSUFFICIENT_BUFFER, "got %d, expected ERROR_INSUFFICIENT_BUFFER\n", error );
ok( error == ERROR_INSUFFICIENT_BUFFER, "got %ld, expected ERROR_INSUFFICIENT_BUFFER\n", error );
size = MAX_PATH;
ret = GetICMProfileW( dc, &size, filename );
ok( ret, "GetICMProfileW failed %d\n", GetLastError() );
ok( ret, "GetICMProfileW failed %ld\n", GetLastError() );
}
static void test_SetICMMode( HDC dc )
......@@ -145,24 +145,24 @@ static void test_SetICMMode( HDC dc )
SetLastError( 0xdeadbeef );
ret = SetICMMode( NULL, 0 );
ok( !ret, "SetICMMode succeeded (%d)\n", GetLastError() );
ok( !ret, "SetICMMode succeeded (%ld)\n", GetLastError() );
ret = SetICMMode( dc, -1 );
ok( !ret, "SetICMMode succeeded (%d)\n", GetLastError() );
ok( !ret, "SetICMMode succeeded (%ld)\n", GetLastError() );
save = SetICMMode( dc, ICM_QUERY );
ok( save == ICM_ON || save == ICM_OFF, "SetICMMode failed (%d)\n", GetLastError() );
ok( save == ICM_ON || save == ICM_OFF, "SetICMMode failed (%ld)\n", GetLastError() );
if (save == ICM_ON) knob = ICM_OFF; else knob = ICM_ON;
ret = SetICMMode( dc, knob );
todo_wine ok( ret, "SetICMMode failed (%d)\n", GetLastError() );
todo_wine ok( ret, "SetICMMode failed (%ld)\n", GetLastError() );
ret = SetICMMode( dc, ICM_QUERY );
todo_wine ok( ret == knob, "SetICMMode failed (%d)\n", GetLastError() );
todo_wine ok( ret == knob, "SetICMMode failed (%ld)\n", GetLastError() );
ret = SetICMMode( dc, save );
ok( ret, "SetICMMode failed (%d)\n", GetLastError() );
ok( ret, "SetICMMode failed (%ld)\n", GetLastError() );
SetLastError( 0xdeadbeef );
dc = CreateDCW( L"DISPLAY", NULL, NULL, NULL );
......@@ -171,10 +171,10 @@ static void test_SetICMMode( HDC dc )
win_skip( "CreateDCW is not implemented\n" );
return;
}
ok( dc != NULL, "CreateDCW failed (%d)\n", GetLastError() );
ok( dc != NULL, "CreateDCW failed (%ld)\n", GetLastError() );
ret = SetICMMode( dc, ICM_QUERY );
ok( ret == ICM_OFF, "SetICMMode failed (%d)\n", GetLastError() );
ok( ret == ICM_OFF, "SetICMMode failed (%ld)\n", GetLastError() );
DeleteDC( dc );
}
......@@ -235,31 +235,31 @@ static void test_SetICMProfileA( HDC dc )
len = sizeof(profile);
ret = GetICMProfileA( dc, &len, profile );
ok(ret, "GetICMProfileA failed %u\n", GetLastError());
ok(ret, "GetICMProfileA failed %lu\n", GetLastError());
SetLastError( 0xdeadbeef );
ret = SetICMProfileA( NULL, NULL );
error = GetLastError();
ok(!ret, "SetICMProfileA succeeded\n");
ok(error == ERROR_INVALID_PARAMETER,
"expected ERROR_INVALID_PARAMETER, got %u\n", error);
"expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError( 0xdeadbeef );
ret = SetICMProfileA( NULL, profile );
error = GetLastError();
ok(!ret, "SetICMProfileA succeeded\n");
ok(error == ERROR_INVALID_HANDLE,
"expected ERROR_INVALID_HANDLE, got %u\n", error);
"expected ERROR_INVALID_HANDLE, got %lu\n", error);
SetLastError( 0xdeadbeef );
ret = SetICMProfileA( dc, NULL );
error = GetLastError();
ok(!ret, "SetICMProfileA succeeded\n");
ok(error == ERROR_INVALID_PARAMETER,
"expected ERROR_INVALID_PARAMETER, got %u\n", error);
"expected ERROR_INVALID_PARAMETER, got %lu\n", error);
ret = SetICMProfileA( dc, profile );
ok(ret, "SetICMProfileA failed %u\n", GetLastError());
ok(ret, "SetICMProfileA failed %lu\n", GetLastError());
}
static void test_SetICMProfileW( HDC dc )
......@@ -278,28 +278,28 @@ static void test_SetICMProfileW( HDC dc )
len = ARRAY_SIZE(profile);
ret = GetICMProfileW( dc, &len, profile );
ok(ret, "GetICMProfileW failed %u\n", GetLastError());
ok(ret, "GetICMProfileW failed %lu\n", GetLastError());
SetLastError( 0xdeadbeef );
ret = SetICMProfileW( NULL, NULL );
error = GetLastError();
ok(!ret, "SetICMProfileW succeeded\n");
ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
SetLastError( 0xdeadbeef );
ret = SetICMProfileW( NULL, profile );
error = GetLastError();
ok(!ret, "SetICMProfileW succeeded\n");
ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %u\n", error);
ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %lu\n", error);
SetLastError( 0xdeadbeef );
ret = SetICMProfileW( dc, NULL );
error = GetLastError();
ok(!ret, "SetICMProfileW succeeded\n");
ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error);
ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error);
ret = SetICMProfileW( dc, profile );
ok(ret, "SetICMProfileW failed %u\n", GetLastError());
ok(ret, "SetICMProfileW failed %lu\n", GetLastError());
}
START_TEST(icm)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -58,7 +58,7 @@ static void test_DIB_PAL_COLORS(void) {
memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) );
hpal = CreatePalette( logpalette );
hpalOld = SelectPalette( memhdc, hpal, FALSE );
ok( hpalOld != NULL, "error=%d\n", GetLastError() );
ok( hpalOld != NULL, "error=%ld\n", GetLastError() );
/* Create a DIB BMP which references colours in the logical palette */
memset( bmp, 0x00, sizeof(BITMAPINFO) );
......@@ -78,9 +78,9 @@ static void test_DIB_PAL_COLORS(void) {
*bmpPalPtr++ = 19; /* Pointer to bad logical palette index */
hbmp = CreateDIBSection( memhdc, bmp, DIB_PAL_COLORS, 0, 0, 0 );
ok( hbmp != NULL, "error=%d\n", GetLastError() );
ok( hbmp != NULL, "error=%ld\n", GetLastError() );
hbmpOld = SelectObject( memhdc, hbmp );
ok( hbmpOld != NULL, "error=%d\n", GetLastError() );
ok( hbmpOld != NULL, "error=%ld\n", GetLastError() );
/* Test with a RGB to DIB_PAL_COLORS */
setColor = RGB( logpalettedata[1].peRed, logpalettedata[1].peGreen, logpalettedata[1].peBlue );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment