On Tue, Sep 17, 2019 at 10:39:20PM +0800, Zhiyi Zhang wrote:
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- v2: Use GetDeviceCaps(hdc, TECHNOLOGY) to check for deleted DCs.
dlls/gdi32/tests/dc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 2d9ef1dd88..49ee708688 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -733,8 +733,8 @@ static void test_DeleteDC(void) ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n");
Could we also add calls to GetDeviceCaps(hdc, TECHNOLOGY) before we destroy the dc, thus emphasising what's changed (leaving the existing GetObjectType() calls where they succeed is also fine). Huw.