Alistair Leslie-Hughes : gdi32/tests: Check values returned from GetPath.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 19 08:56:21 CST 2016


Module: wine
Branch: master
Commit: 9ac1744b8020b258885e35653eb51984ce78718f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9ac1744b8020b258885e35653eb51984ce78718f

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Feb 18 17:54:09 2016 +1100

gdi32/tests: Check values returned from GetPath.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/tests/metafile.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index 6804a96..f464720 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -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);
 }
 




More information about the wine-cvs mailing list