=?UTF-8?Q?Bernhard=20=C3=9Cbelacker=20?=: usp10/tests: Reserve for InClass a byte for every character in teststr.
Alexandre Julliard
julliard at winehq.org
Mon Aug 8 11:09:28 CDT 2016
Module: wine
Branch: master
Commit: d900c758b79da723e5da5f63dc94fd2d556daa7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d900c758b79da723e5da5f63dc94fd2d556daa7d
Author: Bernhard Übelacker <bernhardu at mailbox.org>
Date: Fri Aug 5 22:43:31 2016 +0200
usp10/tests: Reserve for InClass a byte for every character in teststr.
Signed-off-by: Bernhard Übelacker <bernhardu at mailbox.org>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/usp10/tests/usp10.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 6b2152f..aed0620 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -2899,8 +2899,8 @@ static void test_ScriptString(HDC hdc)
int Charset;
DWORD Flags = SSA_GLYPHS;
int ReqWidth = 100;
- const int Dx[5] = {10, 10, 10, 10, 10};
- const BYTE InClass = 0;
+ static const int Dx[(sizeof(teststr) / sizeof(WCHAR)) - 1];
+ static const BYTE InClass[(sizeof(teststr) / sizeof(WCHAR)) - 1];
SCRIPT_STRING_ANALYSIS ssa = NULL;
int X = 10;
@@ -2919,26 +2919,26 @@ static void test_ScriptString(HDC hdc)
/* Test without hdc to get E_PENDING */
hr = ScriptStringAnalyse( NULL, teststr, len, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, Dx, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == E_PENDING, "ScriptStringAnalyse Stub should return E_PENDING not %08x\n", hr);
/* Test that 0 length string returns E_INVALIDARG */
hr = ScriptStringAnalyse( hdc, teststr, 0, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, Dx, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == E_INVALIDARG, "ScriptStringAnalyse should return E_INVALIDARG not %08x\n", hr);
/* test with hdc, this should be a valid test */
hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, Dx, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr);
ScriptStringFree(&ssa);
/* test makes sure that a call with a valid pssa still works */
hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, Dx, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr);
ok(ssa != NULL, "ScriptStringAnalyse pssa should not be NULL\n");
@@ -2982,7 +2982,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
int Charset = -1; /* unicode */
DWORD Flags = SSA_GLYPHS;
int ReqWidth = 100;
- const BYTE InClass = 0;
+ static const BYTE InClass[(sizeof(teststr1)/sizeof(WCHAR))-1];
SCRIPT_STRING_ANALYSIS ssa = NULL;
int Ch; /* Character position in string */
@@ -2999,7 +2999,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, NULL, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == S_OK ||
hr == E_INVALIDARG, /* NT */
"ScriptStringAnalyse should return S_OK or E_INVALIDARG not %08x\n", hr);
@@ -3139,7 +3139,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
*/
hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags,
ReqWidth, NULL, NULL, NULL, NULL,
- &InClass, &ssa);
+ InClass, &ssa);
ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr);
/*
More information about the wine-cvs
mailing list