Commit 9ac1744b authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

gdi32/tests: Check values returned from GetPath.

parent 954ca154
......@@ -3361,6 +3361,41 @@ static void test_emf_polybezier(void)
DeleteEnhMetaFile(hemf);
}
static const unsigned char EMF_PATH_BITS[] =
{
0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe6, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xff, 0xff,
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
0xf8, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x07, 0x00, 0x00, 0xd3, 0x03, 0x00, 0x00,
0xfc, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x07, 0x00,
0xd3, 0xf3, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
0x96, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
0x32, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x32, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x13, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
};
static void test_emf_GetPath(void)
{
HDC hdcMetafile;
......@@ -3383,14 +3418,21 @@ static void test_emf_GetPath(void)
ok( ret, "LineTo error %d.\n", GetLastError());
ret = LineTo(hdcMetafile, 50, 50);
ok( ret, "LineTo error %d.\n", GetLastError());
Rectangle(hdcMetafile, 10, 10, 20, 20);
EndPath(hdcMetafile);
size = GetPath(hdcMetafile, NULL, NULL, 0);
todo_wine ok( size == 5, "GetPath returned %d.\n", size);
todo_wine ok( size == 9, "GetPath returned %d.\n", size);
hemf = CloseEnhMetaFile(hdcMetafile);
ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
if (compare_emf_bits(hemf, EMF_PATH_BITS, sizeof(EMF_PATH_BITS), "test_emf_GetPath", FALSE) != 0)
{
dump_emf_bits(hemf, "test_emf_GetPath");
dump_emf_records(hemf, "test_emf_GetPath");
}
DeleteEnhMetaFile(hemf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment