mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:45:46 +00:00
Synced usp10_winetest.exe with Wine HEAD
svn path=/trunk/; revision=34386
This commit is contained in:
parent
ba32da0049
commit
85ba30dcf2
3 changed files with 1451 additions and 1414 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
/* Automatically generated file; DO NOT EDIT!! */
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
@ -6,7 +8,6 @@
|
||||||
|
|
||||||
extern void func_usp10(void);
|
extern void func_usp10(void);
|
||||||
|
|
||||||
|
|
||||||
const struct test winetest_testlist[] =
|
const struct test winetest_testlist[] =
|
||||||
{
|
{
|
||||||
{ "usp10", func_usp10 },
|
{ "usp10", func_usp10 },
|
||||||
|
|
|
@ -486,19 +486,17 @@ static void test_ScriptTextOut(HDC hdc)
|
||||||
"got %08x\n", hr);
|
"got %08x\n", hr);
|
||||||
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
|
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
|
||||||
|
|
||||||
/* Set psc to NULL, to be able to check if a pointer is returned in psc
|
/* hdc is required for this one rather than the usual optional */
|
||||||
* hdc is required for this one rather than the usual optional */
|
|
||||||
psc = NULL;
|
psc = NULL;
|
||||||
hr = ScriptTextOut(NULL, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
hr = ScriptTextOut(NULL, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
||||||
piAdvance, NULL, pGoffset);
|
piAdvance, NULL, pGoffset);
|
||||||
ok( hr == E_INVALIDARG, "(NULL,&psc,), expected E_INVALIDARG, got %08x\n", hr);
|
ok( hr == E_INVALIDARG, "(NULL,&psc,), expected E_INVALIDARG, got %08x\n", hr);
|
||||||
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
|
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
|
||||||
|
|
||||||
/* Set that is gets a psc and that returns 0 status */
|
/* Set that it returns 0 status */
|
||||||
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
||||||
piAdvance, NULL, pGoffset);
|
piAdvance, NULL, pGoffset);
|
||||||
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
|
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
|
||||||
ok (psc == NULL, "psc should be null\n");
|
|
||||||
|
|
||||||
/* Test Rect Rgn is acceptable */
|
/* Test Rect Rgn is acceptable */
|
||||||
rect.top = 10;
|
rect.top = 10;
|
||||||
|
@ -508,7 +506,6 @@ static void test_ScriptTextOut(HDC hdc)
|
||||||
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs,
|
||||||
piAdvance, NULL, pGoffset);
|
piAdvance, NULL, pGoffset);
|
||||||
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
|
ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr);
|
||||||
ok (psc == NULL, "psc should be null\n");
|
|
||||||
|
|
||||||
iCP = 1;
|
iCP = 1;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, pcGlyphs, (const WORD *) &pwLogClust,
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, pcGlyphs, (const WORD *) &pwLogClust,
|
||||||
|
@ -635,54 +632,74 @@ static void test_ScriptXtoX(void)
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
|
if (piTrailing)
|
||||||
ok(piCP == -1, "Negative iX should return piCP=-1 not %d\n", piCP);
|
ok(piCP == -1, "Negative iX should return piCP=-1 not %d\n", piCP);
|
||||||
ok(piTrailing == TRUE, "Negative iX should return piTrailing=TRUE not %d\n", piTrailing);
|
else /* win2k3 */
|
||||||
|
ok(piCP == 10, "Negative iX should return piCP=10 not %d\n", piCP);
|
||||||
|
|
||||||
iX = 1954;
|
iX = 1954;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 10, "Excessive iX should return piCP=10 not %d\n", piCP);
|
if (piTrailing) /* win2k3 */
|
||||||
ok(piTrailing == FALSE, "Excessive iX should return piTrailing=FALSE not %d\n", piTrailing);
|
ok(piCP == -1, "Negative iX should return piCP=-1 not %d\n", piCP);
|
||||||
|
else
|
||||||
|
ok(piCP == 10, "Negative iX should return piCP=10 not %d\n", piCP);
|
||||||
|
|
||||||
iX = 779;
|
iX = 779;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 3, "iX=%d should return piCP=3 not %d\n", iX, piCP);
|
ok(piCP == 3 ||
|
||||||
|
piCP == -1, /* win2k3 */
|
||||||
|
"iX=%d should return piCP=3 or piCP=-1 not %d\n", iX, piCP);
|
||||||
ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
|
ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
|
||||||
|
|
||||||
iX = 780;
|
iX = 780;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 3, "iX=%d should return piCP=3 not %d\n", iX, piCP);
|
ok(piCP == 3 ||
|
||||||
|
piCP == -1, /* win2k3 */
|
||||||
|
"iX=%d should return piCP=3 or piCP=-1 not %d\n", iX, piCP);
|
||||||
ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
|
ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing);
|
||||||
|
|
||||||
iX = 868;
|
iX = 868;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 4, "iX=%d should return piCP=4 not %d\n", iX, piCP);
|
ok(piCP == 4 ||
|
||||||
|
piCP == -1, /* win2k3 */
|
||||||
|
"iX=%d should return piCP=4 or piCP=-1 not %d\n", iX, piCP);
|
||||||
|
|
||||||
iX = 0;
|
iX = 0;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP);
|
ok(piCP == 0 ||
|
||||||
|
piCP == 10, /* win2k3 */
|
||||||
|
"iX=%d should return piCP=0 piCP=10 not %d\n", iX, piCP);
|
||||||
|
|
||||||
iX = 195;
|
iX = 195;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP);
|
ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP);
|
||||||
|
|
||||||
iX = 196;
|
iX = 196;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing);
|
||||||
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr);
|
||||||
ok(piCP == 1, "iX=%d should return piCP=1 not %d\n", iX, piCP);
|
ok(piCP == 1 ||
|
||||||
|
piCP == 0, /* win2k3 */
|
||||||
|
"iX=%d should return piCP=1 or piCP=0 not %d\n", iX, piCP);
|
||||||
|
|
||||||
iCP=5;
|
iCP=5;
|
||||||
fTrailing = FALSE;
|
fTrailing = FALSE;
|
||||||
|
@ -690,36 +707,49 @@ static void test_ScriptXtoX(void)
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
||||||
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
||||||
ok(piX == 976, "iCP=%d should return piX=976 not %d\n", iCP, piX);
|
ok(piX == 976 ||
|
||||||
|
piX == 100, /* win2k3 */
|
||||||
|
"iCP=%d should return piX=976 or piX=100 not %d\n", iCP, piX);
|
||||||
|
|
||||||
iCP=5;
|
iCP=5;
|
||||||
fTrailing = TRUE;
|
fTrailing = TRUE;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
||||||
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
||||||
ok(piX == 1171, "iCP=%d should return piX=1171 not %d\n", iCP, piX);
|
ok(piX == 1171 ||
|
||||||
|
piX == 80, /* win2k3 */
|
||||||
|
"iCP=%d should return piX=1171 or piX=80 not %d\n", iCP, piX);
|
||||||
|
|
||||||
iCP=6;
|
iCP=6;
|
||||||
fTrailing = FALSE;
|
fTrailing = FALSE;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
||||||
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
||||||
ok(piX == 1171, "iCP=%d should return piX=1171 not %d\n", iCP, piX);
|
ok(piX == 1171 ||
|
||||||
|
piX == 80, /* win2k3 */
|
||||||
|
"iCP=%d should return piX=1171 or piX=80 not %d\n", iCP, piX);
|
||||||
|
|
||||||
iCP=11;
|
iCP=11;
|
||||||
fTrailing = FALSE;
|
fTrailing = FALSE;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
||||||
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
||||||
ok(piX == 1953, "iCP=%d should return piX=1953 not %d\n", iCP, piX);
|
ok(piX == 1953 ||
|
||||||
|
piX == 0, /* win2k3 */
|
||||||
|
"iCP=%d should return piX=1953 or piX=0 not %d\n", iCP, piX);
|
||||||
|
|
||||||
iCP=11;
|
iCP=11;
|
||||||
fTrailing = TRUE;
|
fTrailing = TRUE;
|
||||||
cChars = 10;
|
cChars = 10;
|
||||||
cGlyphs = 10;
|
cGlyphs = 10;
|
||||||
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);
|
||||||
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);
|
||||||
ok(piX == 1953, "iCP=%d should return piX=1953 not %d\n", iCP, piX);
|
ok(piX == 1953 ||
|
||||||
|
piX == 0, /* win2k3 */
|
||||||
|
"iCP=%d should return piX=1953 or piX=0 not %d\n", iCP, piX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_ScriptString(HDC hdc)
|
static void test_ScriptString(HDC hdc)
|
||||||
|
@ -838,10 +868,14 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
|
||||||
hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags,
|
hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags,
|
||||||
ReqWidth, &Control, &State, NULL, &Tabdef,
|
ReqWidth, &Control, &State, NULL, &Tabdef,
|
||||||
&InClass, &ssa);
|
&InClass, &ssa);
|
||||||
ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr);
|
ok(hr == S_OK ||
|
||||||
ok(ssa != NULL, "ScriptStringAnalyse ssa should not be NULL\n");
|
hr == E_INVALIDARG, /* NT */
|
||||||
if (hr == 0)
|
"ScriptStringAnalyse should return S_OK or E_INVALIDARG not %08x\n", hr);
|
||||||
|
|
||||||
|
if (hr == S_OK)
|
||||||
{
|
{
|
||||||
|
ok(ssa != NULL, "ScriptStringAnalyse ssa should not be NULL\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop to generate character positions to provide starting positions for the
|
* Loop to generate character positions to provide starting positions for the
|
||||||
* ScriptStringCPtoX and ScriptStringXtoCP functions
|
* ScriptStringCPtoX and ScriptStringXtoCP functions
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
<group>
|
<group>
|
||||||
<module name="usp10_winetest" type="win32cui" installbase="bin" installname="usp10_winetest.exe" allowwarnings="true">
|
<module name="usp10_winetest" type="win32cui" installbase="bin" installname="usp10_winetest.exe" allowwarnings="true">
|
||||||
<include base="usp10_winetest">.</include>
|
<include base="usp10_winetest">.</include>
|
||||||
<define name="__USE_W32API" />
|
<define name="WINVER">0x600</define>
|
||||||
<library>ntdll</library>
|
<define name="_WIN32_WINNT">0x600</define>
|
||||||
<library>gdi32</library>
|
|
||||||
<library>kernel32</library>
|
|
||||||
<library>user32</library>
|
|
||||||
<library>usp10</library>
|
|
||||||
<file>usp10.c</file>
|
<file>usp10.c</file>
|
||||||
<file>testlist.c</file>
|
<file>testlist.c</file>
|
||||||
|
<library>wine</library>
|
||||||
|
<library>usp10</library>
|
||||||
|
<library>user32</library>
|
||||||
|
<library>gdi32</library>
|
||||||
|
<library>kernel32</library>
|
||||||
|
<library>ntdll</library>
|
||||||
</module>
|
</module>
|
||||||
</group>
|
</group>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue