Commit c1e68642 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 20ae9be5
......@@ -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);
}
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment