Disable some misleading service tests because a test cannot determine wheter or not...
[reactos.git] / rostests / apitests / gdi32 / GetClipRgn.c
1 /*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for GetClipRgn
5 * PROGRAMMERS: Timo Kreuzer
6 */
7
8 #include <stdio.h>
9 #include <wine/test.h>
10 #include <windows.h>
11
12 void Test_GetClipRgn()
13 {
14 HWND hWnd;
15 HDC hDC;
16 HRGN hrgn;//, hrgn2;
17 int ret;
18
19 /* Create a window */
20 hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
21 CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
22 NULL, NULL, 0, 0);
23
24 hDC = GetDC(hWnd);
25 hrgn = CreateRectRgn(0,0,0,0);
26
27 /* Test invalid DC */
28 SetLastError(ERROR_SUCCESS);
29 ret = GetClipRgn((HDC)0x12345, hrgn);
30 ok(ret == -1, "Expected -1, got %d\n", ret);
31 ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
32
33 /* Test invalid hrgn */
34 SetLastError(ERROR_SUCCESS);
35 ret = GetClipRgn(hDC, (HRGN)0x12345);
36 ok(ret == 0, "Expected 0, got %d\n", ret);
37 ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
38
39 ReleaseDC(hWnd, hDC);
40 DestroyWindow(hWnd);
41 }
42
43 START_TEST(GetClipRgn)
44 {
45 Test_GetClipRgn();
46 }
47