Convert gdi32api into wine style test
[reactos.git] / rostests / apitests / gdi32 / BeginPath.c
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 <stdio.h>
9 #include <wine/test.h>
10 #include <windows.h>
11
12 void Test_BeginPath()
13 {
14 HDC hdc;
15 BOOL ret;
16
17 SetLastError(0);
18 ret = BeginPath(0);
19 ok(ret == 0, "BeginPath(0) succeeded, ret == %d\n", ret);
20 ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %ld\n", GetLastError());
21
22 hdc = CreateCompatibleDC(NULL);
23
24 SetLastError(0);
25 ret = BeginPath(hdc);
26 ok(ret == 1, "BeginPath(hdc) failed, ret == %d\n", ret);
27 ok(GetLastError() == 0, "GetLastError() == %ld\n", GetLastError());
28
29 DeleteDC(hdc);
30
31 }
32
33 START_TEST(BeginPath)
34 {
35 Test_BeginPath();
36 }
37