ReactOS  0.4.14-dev-342-gdc047f9
BeginPath.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: Test for BeginPath
5  * PROGRAMMERS: Timo Kreuzer
6  */
7 
8 #include "precomp.h"
9 
11 {
12  HDC hdc;
13  BOOL ret;
14 
15  SetLastError(0);
16  ret = BeginPath(0);
17  ok(ret == 0, "BeginPath(0) succeeded, ret == %d\n", ret);
18  ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %ld\n", GetLastError());
19 
21 
22  SetLastError(0);
23  ret = BeginPath(hdc);
24  ok(ret == 1, "BeginPath(hdc) failed, ret == %d\n", ret);
25  ok(GetLastError() == 0, "GetLastError() == %ld\n", GetLastError());
26 
27  DeleteDC(hdc);
28 
29 }
30 
32 {
34 }
35 
void Test_BeginPath()
Definition: BeginPath.c:10
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
static HDC
Definition: imagelist.c:92
START_TEST(BeginPath)
Definition: BeginPath.c:31
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define SetLastError(x)
Definition: compat.h:417
int ret
HDC hdc
Definition: main.c:9
BOOL WINAPI DeleteDC(_In_ HDC)
#define ok(value,...)
Definition: atltest.h:57
BOOL WINAPI BeginPath(_In_ HDC hdc)