Module: wine Branch: master Commit: c1e686429a730ce850c5877bda968eb2a5a8c51c URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1e686429a730ce850c5877bda...
Author: Hans Leidekker hans@it.vu.nl Date: Thu May 1 17:42:03 2008 +0200
usp10: Fix a few failing tests and make them pass on Wine.
---
dlls/usp10/tests/usp10.c | 8 +++++--- dlls/usp10/usp10.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index b0a0b85..252f7d9 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -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); } }
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 5e6b147..57e6611 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -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;