usp10: Fix a few failing tests and make them pass on Wine.

This commit is contained in:
Hans Leidekker 2008-05-01 17:42:03 +02:00 committed by Alexandre Julliard
parent 20ae9be595
commit c1e686429a
2 changed files with 6 additions and 4 deletions

View File

@ -498,7 +498,7 @@ static void test_ScriptTextOut(HDC hdc)
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
piAdvance, NULL, pGoffset);
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n");
ok (psc == NULL, "psc should be null\n");
/* Test Rect Rgn is acceptable */
rect.top = 10;
@ -508,7 +508,7 @@ static void test_ScriptTextOut(HDC hdc)
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
piAdvance, NULL, pGoffset);
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n");
ok (psc == NULL, "psc should be null\n");
iCP = 1;
hr = ScriptCPtoX(iCP, fTrailing, cChars, pcGlyphs, (const WORD *) &pwLogClust,
@ -953,7 +953,9 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
/*
* ScriptStringCPtoX should free ssa, hence ScriptStringFree should fail
*/
ok(hr == E_INVALIDARG, "ScriptStringFree should return E_INVALIDARG not %08x\n", hr);
ok(hr == E_INVALIDARG ||
hr == E_FAIL, /* win2k3 */
"ScriptStringFree should return E_INVALIDARG or E_FAIL not %08x\n", hr);
}
}

View File

@ -1413,7 +1413,7 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
hdc, psc, x, y, fuOptions, lprc, psa, pwcReserved, iReserved, pwGlyphs, cGlyphs,
piAdvance, piJustify, pGoffset);
if (!hdc && psc && !*psc) return E_INVALIDARG;
if (!hdc || !psc) return E_INVALIDARG;
if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG;
fuOptions &= ETO_CLIPPED + ETO_OPAQUE;