user32/tests: Test that class data is set with wrong size value too.

oldstable
Nikolay Sivov 2011-07-03 15:06:52 +04:00 committed by Alexandre Julliard
parent 3969416808
commit 4843cff6ef
1 changed files with 6 additions and 0 deletions

View File

@ -954,22 +954,28 @@ if (0) { /* crashes under XP */
"expected ERROR_NOACCESS, got %d\n", GetLastError());
wcx.cbSize = 0;
wcx.lpfnWndProc = NULL;
SetLastError(0xdeadbeef);
ret = GetClassInfoExA(0, "static", &wcx);
ok(ret, "GetClassInfoExA() error %d\n", GetLastError());
ok(wcx.cbSize == 0, "expected 0, got %u\n", wcx.cbSize);
ok(wcx.lpfnWndProc != NULL, "got null proc\n");
wcx.cbSize = sizeof(wcx) - 1;
wcx.lpfnWndProc = NULL;
SetLastError(0xdeadbeef);
ret = GetClassInfoExA(0, "static", &wcx);
ok(ret, "GetClassInfoExA() error %d\n", GetLastError());
ok(wcx.cbSize == sizeof(wcx) - 1, "expected sizeof(wcx)-1, got %u\n", wcx.cbSize);
ok(wcx.lpfnWndProc != NULL, "got null proc\n");
wcx.cbSize = sizeof(wcx) + 1;
wcx.lpfnWndProc = NULL;
SetLastError(0xdeadbeef);
ret = GetClassInfoExA(0, "static", &wcx);
ok(ret, "GetClassInfoExA() error %d\n", GetLastError());
ok(wcx.cbSize == sizeof(wcx) + 1, "expected sizeof(wcx)+1, got %u\n", wcx.cbSize);
ok(wcx.lpfnWndProc != NULL, "got null proc\n");
}
START_TEST(class)