From 6e93589eead5ce5e5018146f02ea2ab96b058e8e Mon Sep 17 00:00:00 2001 From: Julius Schwartzenberg Date: Sun, 11 Oct 2009 15:32:15 +0200 Subject: Adding extra class value tests for the standard classes --- dlls/user32/tests/class.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index f8a4cd8..46afc44 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -831,10 +831,49 @@ static void CreateDialogParamTest(HINSTANCE hInstance) } } +struct extra_value +{ + const char name[9]; + int value; + int badvalue; +}; + +const struct extra_value extra_values[] = +{ + {"#32770",30,30}, /* Dialog */ + #ifdef _WIN64 + {"Edit",8,8}, + #else + {"Edit",6,8}, /* Windows XP 64-bit returns 8 also to 32-bit applications */ + #endif +}; + +static void test_extra_values(void) +{ + int i; + for(i=0; i< sizeof(extra_values)/sizeof(extra_values[0]); i++) + { + WNDCLASSEX wcx; + + if (!GetClassInfoEx(NULL,extra_values[i].name,&wcx)) { + ok(FALSE, "GetClassInfo (0) failed for global class: %s!\n", extra_values[i].name); + continue; + } + + if (extra_values[i].value == extra_values[i].badvalue) + ok(extra_values[i].value == wcx.cbWndExtra, "expected %d, got %d\n", extra_values[i].value, wcx.cbWndExtra); + else + ok(extra_values[i].value == wcx.cbWndExtra || broken(extra_values[i].badvalue == wcx.cbWndExtra), + "expected %d, got %d\n", extra_values[i].value, wcx.cbWndExtra); + } +} + START_TEST(class) { HANDLE hInstance = GetModuleHandleA( NULL ); + test_extra_values(); + if (!GetModuleHandleW(0)) { trace("Class test is incompatible with Win9x implementation, skipping\n"); -- 1.6.3.3