[PATCH 2/5] gdi32/tests: Add a test for GetGlyphOutline with an insufficient buffer.

Matteo Bruni mbruni at codeweavers.com
Tue Sep 30 07:51:44 CDT 2014


---
 dlls/gdi32/tests/font.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 852c858..4ec81b2 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -4377,6 +4377,12 @@ static void test_GetGlyphOutline(void)
        ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError());
     }
 
+    /* test GetGlyphOutline with a buffer too small */
+    SetLastError(0xdeadbeef);
+    ret = GetGlyphOutlineA(hdc, 'A', GGO_NATIVE, &gm, sizeof(i), &i, &mat);
+    if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+        ok(ret == GDI_ERROR, "GetGlyphOutlineW should return an error when the buffer size is too small.\n");
+
     for (i = 0; i < sizeof(fmt) / sizeof(fmt[0]); ++i)
     {
         DWORD dummy;
-- 
1.8.5.5




More information about the wine-patches mailing list