mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 18:53:05 +00:00
- make apitest.c into a static lib to be used by different tests
- add a gdi32 api test, based on the one in the win32 folder - add a user32 api test - change type of test functions to int - implement a quick 'n dirty html api status output - uncomment NtGdiTransormPoints in w32kdll.def - add ASSERT1 macro (ASSERT is already used) - include some more headers svn path=/trunk/; revision=28169
This commit is contained in:
parent
342efc07e7
commit
58c6a293bc
30 changed files with 1217 additions and 24 deletions
47
rostests/apitests/user32api/tests/ScrollWindowEx.c
Normal file
47
rostests/apitests/user32api/tests/ScrollWindowEx.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include "../user32api.h"
|
||||
|
||||
INT
|
||||
Test_ScrollWindowEx(PTESTINFO pti)
|
||||
{
|
||||
HWND hWnd;
|
||||
HRGN hrgn;
|
||||
int Result;
|
||||
|
||||
/* Create a window */
|
||||
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
|
||||
NULL, NULL, g_hInstance, 0);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
/* Assert that no update region is there */
|
||||
hrgn = CreateRectRgn(0,0,0,0);
|
||||
ASSERT1(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION);
|
||||
|
||||
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, 0);
|
||||
TEST(Result == SIMPLEREGION);
|
||||
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION);
|
||||
|
||||
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, SW_INVALIDATE);
|
||||
TEST(Result == SIMPLEREGION);
|
||||
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == SIMPLEREGION);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
// test invalid update region
|
||||
DeleteObject(hrgn);
|
||||
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, hrgn, NULL, SW_INVALIDATE);
|
||||
TEST(Result == ERROR);
|
||||
hrgn = CreateRectRgn(0,0,0,0);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
// Test invalid updaterect pointer
|
||||
Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, (LPRECT)1, SW_INVALIDATE);
|
||||
TEST(Result == ERROR);
|
||||
TEST(GetUpdateRgn(hWnd, hrgn, FALSE) == SIMPLEREGION);
|
||||
|
||||
// test for alignment of rects
|
||||
|
||||
DeleteObject(hrgn);
|
||||
DestroyWindow(hWnd);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue