Massimo Del Fedele : gdi32/tests: Add test for GetGlyphOutlineW() requesting buffer size for space char.

Alexandre Julliard julliard at winehq.org
Tue Mar 31 12:19:23 CDT 2009


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

Author: Massimo Del Fedele <max at veneto.com>
Date:   Mon Mar 30 19:47:29 2009 +0200

gdi32/tests: Add test for GetGlyphOutlineW() requesting buffer size for space char.

---

 dlls/gdi32/tests/font.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index cc5e3f5..c10d6e8 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -2887,6 +2887,23 @@ static void test_GetGlyphOutline(void)
        ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError());
     }
 
+    /* test for needed buffer size request on space char */
+    memset(&gm, 0, sizeof(gm));
+    SetLastError(0xdeadbeef);
+    ret = GetGlyphOutlineW(hdc, ' ', GGO_NATIVE, &gm, 0, NULL, &mat);
+    if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+        ok(ret == 0, "GetGlyphOutlineW should return 0 buffer size for space char\n");
+
+    /* requesting buffer size for space char + error */
+    memset(&gm, 0, sizeof(gm));
+    SetLastError(0xdeadbeef);
+    ret = GetGlyphOutlineW(0, ' ', GGO_NATIVE, &gm, 0, NULL, NULL);
+    if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+    {
+       ok(ret == GDI_ERROR, "GetGlyphOutlineW should return GDI_ERROR\n");
+       ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError());
+    }
+
     SelectObject(hdc, old_hfont);
     DeleteObject(hfont);
     DeleteDC(hdc);




More information about the wine-cvs mailing list