Nikolay Sivov : user32/tests: Add tests for invalid index in GetSysColorBrush().
Alexandre Julliard
julliard at winehq.org
Tue Dec 29 09:06:45 CST 2009
Module: wine
Branch: master
Commit: 2a0fca79ae3d342b53ebdcf22856426ebe4f8921
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a0fca79ae3d342b53ebdcf22856426ebe4f8921
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue Dec 29 15:48:24 2009 +0300
user32/tests: Add tests for invalid index in GetSysColorBrush().
---
dlls/user32/tests/sysparams.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c
index dd1e708..a9b79fa 100644
--- a/dlls/user32/tests/sysparams.c
+++ b/dlls/user32/tests/sysparams.c
@@ -2764,6 +2764,27 @@ static void test_EnumDisplaySettings(void)
}
}
+static void test_GetSysColorBrush(void)
+{
+ HBRUSH hbr;
+
+ SetLastError(0xdeadbeef);
+ hbr = GetSysColorBrush(-1);
+ todo_wine ok(hbr == NULL, "Expected NULL brush\n");
+ ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError());
+ /* greater than max index */
+ hbr = GetSysColorBrush(COLOR_MENUBAR);
+ if (hbr)
+ {
+ SetLastError(0xdeadbeef);
+ hbr = GetSysColorBrush(COLOR_MENUBAR + 1);
+ todo_wine ok(hbr == NULL, "Expected NULL brush\n");
+ ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError());
+ }
+ else
+ win_skip("COLOR_MENUBAR unsupported\n");
+}
+
START_TEST(sysparams)
{
int argc;
@@ -2794,6 +2815,7 @@ START_TEST(sysparams)
test_GetSystemMetrics( );
trace("testing EnumDisplaySettings vs GetDeviceCaps\n");
test_EnumDisplaySettings( );
+ test_GetSysColorBrush( );
change_counter = 0;
change_last_param = 0;
More information about the wine-cvs
mailing list