Alexandre Julliard : user32/tests: Also test device caps on a released DC.
Alexandre Julliard
julliard at winehq.org
Tue Feb 27 17:29:34 CST 2018
Module: wine
Branch: master
Commit: f80802edd70851f8b01faf1702c94328ff5b6ecd
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f80802edd70851f8b01faf1702c94328ff5b6ecd
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Feb 27 16:36:22 2018 +0100
user32/tests: Also test device caps on a released DC.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/tests/dce.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c
index 587f36f..18ded33 100644
--- a/dlls/user32/tests/dce.c
+++ b/dlls/user32/tests/dce.c
@@ -40,7 +40,7 @@ static void test_dc_attributes(void)
{
HDC hdc, old_hdc;
HDC hdcs[20];
- INT i, rop, def_rop;
+ INT i, rop, def_rop, caps;
BOOL found_dc;
/* test cache DC */
@@ -118,8 +118,29 @@ static void test_dc_attributes(void)
ok( rop == 0, "got %d\n", rop );
rop = GetROP2( old_hdc );
ok( rop == 0, "got %d\n", rop );
+ caps = GetDeviceCaps( old_hdc, HORZRES );
+ ok( caps == 0, "got %d\n", caps );
+ caps = GetDeviceCaps( old_hdc, VERTRES );
+ ok( caps == 0, "got %d\n", caps );
+ caps = GetDeviceCaps( old_hdc, NUMCOLORS );
+ ok( caps == 0, "got %d\n", caps );
ok( WindowFromDC( old_hdc ) == 0, "wrong window\n" );
+ hdc = GetDC(0);
+ caps = GetDeviceCaps( hdc, HORZRES );
+ ok( caps != 0, "got %d\n", caps );
+ caps = GetDeviceCaps( hdc, VERTRES );
+ ok( caps != 0, "got %d\n", caps );
+ caps = GetDeviceCaps( hdc, NUMCOLORS );
+ ok( caps != 0, "got %d\n", caps );
+ ReleaseDC( 0, hdc );
+ caps = GetDeviceCaps( hdc, HORZRES );
+ ok( caps == 0, "got %d\n", caps );
+ caps = GetDeviceCaps( hdc, VERTRES );
+ ok( caps == 0, "got %d\n", caps );
+ caps = GetDeviceCaps( hdc, NUMCOLORS );
+ ok( caps == 0, "got %d\n", caps );
+
/* test own DC */
hdc = GetDC( hwnd_owndc );
More information about the wine-cvs
mailing list