From 1f67849a7e13070592be65017c46c9068e67cebe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 24 Feb 2017 01:02:26 +0000 Subject: [PATCH] [GDI32_APITEST]: GetGlyphIndices: Have fun & make ReactOS BSoD from user-mode! More seriously, test extra cases of this API, and show that our current implementation certainly is incomplete & prone to bugs. The particular case "GetGlyphIndicesW(hdc, NULL, 0, NULL, 0)" is used by Word 2010 (and other apps) when opening the font combolist, and seems to be undocumented. CORE-12825 CORE-6621 CORE-12279 svn path=/trunk/; revision=73894 --- rostests/apitests/gdi32/GetGlyphIndices.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rostests/apitests/gdi32/GetGlyphIndices.c b/rostests/apitests/gdi32/GetGlyphIndices.c index c7ddc0f2657..6e3377359c3 100644 --- a/rostests/apitests/gdi32/GetGlyphIndices.c +++ b/rostests/apitests/gdi32/GetGlyphIndices.c @@ -124,9 +124,19 @@ START_TEST(GetGlyphIndices) ok_lasterrornotchanged(); ok_int(GetGlyphIndicesW(hdc, NULL, 1, Indices, 0), GDI_ERROR); ok_lasterrornotchanged(); + ok_int(GetGlyphIndicesW(hdc, Single, 0, NULL, 0), GDI_ERROR); + ok_lasterrornotchanged(); + ok_int(GetGlyphIndicesW(hdc, Single, 0, Indices, 0), GDI_ERROR); + ok_lasterrornotchanged(); ok_int(GetGlyphIndicesW(hdc, Single, 1, NULL, 0), GDI_ERROR); ok_lasterrornotchanged(); + /* Test an exceptional case that does not seem to return an error */ + // FIXME: What does the returned value exactly means? + ok(GetGlyphIndicesW(hdc, NULL, 0, NULL, 0) != 0, + "GetGlyphIndicesW(hdc, NULL, 0, NULL, 0) return expected not zero, but got zero!\n"); + ok_lasterrornotchanged(); + /* Test a single valid char */ Single[0] = L'a'; ok_int(GetGlyphIndicesW(hdc, Single, 1, Indices, 0), 1); -- 2.17.1