usp10/tests: Remove workarounds that are no longer useful.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-09-11 20:15:33 +03:00 committed by Alexandre Julliard
parent 8b880d05d6
commit 3d1b4d3738
1 changed files with 6 additions and 33 deletions

View File

@ -58,8 +58,6 @@ static HRESULT (WINAPI *pScriptItemizeOpenType)( const WCHAR *pwcInChars, int cI
static HRESULT (WINAPI *pScriptShapeOpenType)( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int *rcRangeChars, TEXTRANGE_PROPERTIES **rpRangeProperties, int cRanges, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProps, WORD *pwOutGlyphs, SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs);
static DWORD (WINAPI *pGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags);
static HRESULT (WINAPI *pScriptGetFontScriptTags)( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags);
static HRESULT (WINAPI *pScriptGetFontLanguageTags)( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, int cMaxTags, OPENTYPE_TAG *pLangSysTags, int *pcTags);
static HRESULT (WINAPI *pScriptGetFontFeatureTags)( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa, OPENTYPE_TAG tagScript, OPENTYPE_TAG tagLangSys, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags);
@ -600,8 +598,6 @@ static void test_ScriptItemize( void )
HRESULT hr;
int nItems;
pGetGlyphIndicesW = (void*)GetProcAddress(GetModuleHandleA("gdi32.dll"), "GetGlyphIndicesW");
memset(&Control, 0, sizeof(Control));
memset(&State, 0, sizeof(State));
@ -1313,7 +1309,7 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co
WORD glyph = 0;
*origFont = SelectObject(hdc,*hfont);
if (pGetGlyphIndicesW && (pGetGlyphIndicesW(hdc, &check, 1, &glyph, 0) == GDI_ERROR || glyph ==0))
if (GetGlyphIndicesW(hdc, &check, 1, &glyph, 0) == GDI_ERROR || glyph == 0)
{
winetest_trace(" Font fails to contain required glyphs\n");
SelectObject(hdc,*origFont);
@ -2538,12 +2534,6 @@ static void test_ScriptGetFontProperties(HDC hdc)
ScriptFreeCache(&psc);
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
pGetGlyphIndicesW = (void*)GetProcAddress(GetModuleHandleA("gdi32.dll"), "GetGlyphIndicesW");
if (!pGetGlyphIndicesW)
{
win_skip("Skip on WINNT4\n");
return;
}
memset(&lf, 0, sizeof(lf));
lf.lfCharSet = DEFAULT_CHARSET;
efnd.total = 0;
@ -2577,7 +2567,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
ret = GetTextMetricsA(hdc, &tmA);
ok(ret != 0, "GetTextMetricsA failed!\n");
ret = pGetGlyphIndicesW(hdc, invalids, 1, gi, GGI_MARK_NONEXISTING_GLYPHS);
ret = GetGlyphIndicesW(hdc, invalids, 1, gi, GGI_MARK_NONEXISTING_GLYPHS);
ok(ret != GDI_ERROR, "GetGlyphIndicesW failed!\n");
ok(sfp.wgBlank == tmA.tmBreakChar || sfp.wgBlank == gi[0], "bitmap font %s wgBlank %04x tmBreakChar %04x Space %04x\n", lf.lfFaceName, sfp.wgBlank, tmA.tmBreakChar, gi[0]);
@ -2623,13 +2613,13 @@ static void test_ScriptGetFontProperties(HDC hdc)
}
str[0] = 0x0020; /* U+0020: numeric space */
ret = pGetGlyphIndicesW(hdc, str, 1, gi, 0);
ret = GetGlyphIndicesW(hdc, str, 1, gi, 0);
ok(ret != GDI_ERROR, "GetGlyphIndicesW failed!\n");
ok(sfp.wgBlank == gi[0], "truetype font %s wgBlank %04x gi[0] %04x\n", lf.lfFaceName, sfp.wgBlank, gi[0]);
ok(sfp.wgDefault == 0 || broken(is_arabic), "truetype font %s wgDefault %04x\n", lf.lfFaceName, sfp.wgDefault);
ret = pGetGlyphIndicesW(hdc, invalids, 3, gi, GGI_MARK_NONEXISTING_GLYPHS);
ret = GetGlyphIndicesW(hdc, invalids, 3, gi, GGI_MARK_NONEXISTING_GLYPHS);
ok(ret != GDI_ERROR, "GetGlyphIndicesW failed!\n");
if (gi[2] != 0xFFFF) /* index of default non exist char */
ok(sfp.wgInvalid == gi[2], "truetype font %s wgInvalid %04x gi[2] %04x\n", lf.lfFaceName, sfp.wgInvalid, gi[2]);
@ -2641,7 +2631,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
ok(sfp.wgInvalid == 0, "truetype font %s wgInvalid %04x expect 0\n", lf.lfFaceName, sfp.wgInvalid);
str[0] = 0x0640; /* U+0640: kashida */
ret = pGetGlyphIndicesW(hdc, str, 1, gi, GGI_MARK_NONEXISTING_GLYPHS);
ret = GetGlyphIndicesW(hdc, str, 1, gi, GGI_MARK_NONEXISTING_GLYPHS);
ok(ret != GDI_ERROR, "GetGlyphIndicesW failed!\n");
is_arial = !lstrcmpA(lf.lfFaceName, "Arial");
is_times_new_roman= !lstrcmpA(lf.lfFaceName, "Times New Roman");
@ -3649,27 +3639,10 @@ static void test_digit_substitution(void)
LGRPID_GEORGIAN,
LGRPID_ARMENIAN
};
HMODULE hKernel32;
static BOOL (WINAPI * pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR);
hKernel32 = GetModuleHandleA("kernel32.dll");
pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA");
if (!pEnumLanguageGroupLocalesA)
{
win_skip("EnumLanguageGroupLocalesA not available on this platform\n");
return;
}
for (i = 0; i < sizeof(groups)/sizeof(groups[0]); i++)
{
ret = pEnumLanguageGroupLocalesA(enum_proc, groups[i], 0, 0);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("EnumLanguageGroupLocalesA not implemented on this platform\n");
break;
}
ret = EnumLanguageGroupLocalesA(enum_proc, groups[i], 0, 0);
ok(ret, "EnumLanguageGroupLocalesA failed unexpectedly: %u\n", GetLastError());
}
}