Author: hbelusca Date: Fri Feb 24 01:02:26 2017 New Revision: 73894
URL: http://svn.reactos.org/svn/reactos?rev=73894&view=rev Log: [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
Modified: trunk/rostests/apitests/gdi32/GetGlyphIndices.c
Modified: trunk/rostests/apitests/gdi32/GetGlyphIndices.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/GetGlyphInd... ============================================================================== --- trunk/rostests/apitests/gdi32/GetGlyphIndices.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/GetGlyphIndices.c [iso-8859-1] Fri Feb 24 01:02:26 2017 @@ -124,7 +124,17 @@ 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 */