gdi32: add testcases for copying an EMF from a NULL bitmap
Austin English
austinenglish at gmail.com
Sun Nov 1 23:27:38 CST 2009
Testcase for bug 4553
--
-Austin
-------------- next part --------------
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c
index a186608..3d2a2f8 100644
--- a/dlls/gdi32/tests/metafile.c
+++ b/dlls/gdi32/tests/metafile.c
@@ -2618,6 +2618,31 @@ static void test_SetEnhMetaFileBits(void)
DeleteEnhMetaFile(hemf);
}
+static void test_emf_copy(void)
+{
+ HDC hdc;
+ HDC hemfdc;
+ BOOL r;
+ HENHMETAFILE hemf;
+
+ hdc = GetDC(NULL);
+ ok( hdc != NULL, "create dc failed\n");
+
+ hemfdc = CreateEnhMetaFile( hdc, NULL, NULL, NULL );
+ ok( hemfdc != NULL, "create emf failed\n");
+
+ r = BitBlt( 0, 0, 0, 100, 100, hemfdc, 0, 0, 0xff0062);
+ ok( r == FALSE, "bitblt failed\n");
+
+ r = BitBlt( hemfdc, 0, 0, 100, 100, 0, 0, 0, 0xff0062);
+ ok( r == TRUE, "bitblt failed\n");
+
+ hemf = CloseEnhMetaFile(hemfdc);
+ ok( hemf != NULL, "failed to get ehmmetafile handle\n");
+
+ DeleteObject(hemf);
+}
+
START_TEST(metafile)
{
init_function_pointers();
@@ -2644,4 +2669,5 @@ START_TEST(metafile)
test_gdiis();
test_SetEnhMetaFileBits();
+ test_emf_copy();
}
More information about the wine-patches
mailing list