gdi32/tests: Make sure to use return values (LLVM/Clang).
This commit is contained in:
parent
ab4dba3e75
commit
a13e596c78
|
@ -520,8 +520,10 @@ static void test_SaveDC(void)
|
|||
SetPixelV(hdcMetafile, 50, 50, 0);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %i\n",size.cx);
|
||||
ret = SaveDC(hdcMetafile);
|
||||
ok(ret == 1, "ret = %d\n", ret);
|
||||
|
@ -535,8 +537,10 @@ static void test_SaveDC(void)
|
|||
SetPixelV(hdcMetafile, 50, 50, 0);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 10,"Expecting ViewportOrg x of 10, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 200,"Expecting ViewportExt cx of 200, got %i\n",size.cx);
|
||||
ret = SaveDC(hdcMetafile);
|
||||
ok(ret == 2, "ret = %d\n", ret);
|
||||
|
@ -552,8 +556,10 @@ static void test_SaveDC(void)
|
|||
SetPixelV(hdcMetafile, 50, 50, 0);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx);
|
||||
ret = SaveDC(hdcMetafile);
|
||||
ok(ret == 3, "ret = %d\n", ret);
|
||||
|
@ -572,15 +578,19 @@ static void test_SaveDC(void)
|
|||
SetPixelV(hdcMetafile, 50, 50, 0);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 30,"Expecting ViewportOrg x of 30, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 400,"Expecting ViewportExt cx of 400, got %i\n",size.cx);
|
||||
ret = RestoreDC(hdcMetafile, -1);
|
||||
ok(ret, "ret = %d\n", ret);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx);
|
||||
ok( GetPolyFillMode( hdcMetafile ) == ALTERNATE, "PolyFillMode not restored\n" );
|
||||
ok( GetBkColor( hdcMetafile ) == 0, "Background color not restored\n" );
|
||||
|
@ -588,14 +598,18 @@ static void test_SaveDC(void)
|
|||
ok(ret == 3, "ret = %d\n", ret);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx);
|
||||
ret = RestoreDC(hdcMetafile, 1);
|
||||
ok(ret, "ret = %d\n", ret);
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %i\n",size.cx);
|
||||
|
||||
SetWindowOrgEx(hdcMetafile, -4, -4, NULL);
|
||||
|
@ -607,15 +621,19 @@ static void test_SaveDC(void)
|
|||
SetPixelV(hdcMetafile, 50, 50, 0);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx);
|
||||
ret = SaveDC(hdcMetafile);
|
||||
ok(ret == 1, "ret = %d\n", ret);
|
||||
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx);
|
||||
ret = SaveDC(hdcMetafile);
|
||||
ok(ret == 2, "ret = %d\n", ret);
|
||||
|
@ -643,8 +661,10 @@ static void test_SaveDC(void)
|
|||
ret = RestoreDC(hdcMetafile, 1);
|
||||
ok(ret, "ret = %d\n", ret);
|
||||
ret = GetViewportOrgEx(hdcMetafile, &pt);
|
||||
ok(ret, "GetViewportOrgEx error %u\n", GetLastError());
|
||||
ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x);
|
||||
ret = GetViewportExtEx(hdcMetafile, &size);
|
||||
ok(ret, "GetViewportExtEx error %u\n", GetLastError());
|
||||
ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx);
|
||||
|
||||
hFontCheck = SelectObject(hdcMetafile, hFontOld);
|
||||
|
@ -1996,6 +2016,7 @@ static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table,
|
|||
ok(ret == sizeof(rgn2.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret);
|
||||
|
||||
ret = GetRegionData(hrgn, sizeof(rgn2), &rgn2.data);
|
||||
ok(ret == sizeof(rgn2), "expected sizeof(rgn2), got %u\n", ret);
|
||||
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n",
|
||||
rgn2.data.rdh.dwSize, rgn2.data.rdh.iType,
|
||||
|
|
Loading…
Reference in New Issue