Module: wine Branch: master Commit: 9f548bd9b85995a6edd5c1ba392abdeb7934d12d URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f548bd9b85995a6edd5c1ba39...
Author: Julius Schwartzenberg julius.schwartzenberg@gmail.com Date: Sun Oct 11 15:32:15 2009 +0200
user32/tests: Test extra value of standard dialog and edit classes.
---
dlls/user32/tests/class.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index 0e7b0e4..7b42ce3 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -831,10 +831,42 @@ static void CreateDialogParamTest(HINSTANCE hInstance) } }
+static const struct +{ + const char name[9]; + int value; + int badvalue; +} 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; + BOOL ret = GetClassInfoEx(NULL,extra_values[i].name,&wcx); + + ok( ret, "GetClassInfo (0) failed for global class %s\n", extra_values[i].name); + if (!ret) continue; + 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");