Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b2985803
Commit
b2985803
authored
May 10, 2021
by
Francois Gouget
Committed by
Alexandre Julliard
May 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infosoft/tests: Improve the failure messages.
Signed-off-by:
Francois Gouget
<
fgouget@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86edbc8b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
infosoft.c
dlls/infosoft/tests/infosoft.c
+18
-9
No files found.
dlls/infosoft/tests/infosoft.c
View file @
b2985803
...
...
@@ -71,17 +71,26 @@ static HRESULT WINAPI ws_PutWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcIn
ULONG
cwcSrcLen
,
ULONG
cwcSrcPos
)
{
HRESULT
rc
=
S_OK
;
winetest_push_context
(
"word %d"
,
wordnum
);
if
(
wordnum
<
ARRAY_SIZE
(
testres
))
{
ok
(
testres
[
wordnum
].
len
==
cwcSrcLen
,
"wrong length
\n
"
);
ok
(
!
cwcSrcPos
||
(
testres
[
wordnum
].
ofs
==
cwcSrcPos
),
"wrong offset
\n
"
);
ok
(
!
memcmp
(
testres
[
wordnum
].
data
,
pwcInBuf
,
cwcSrcLen
),
"wrong data
\n
"
);
ok
(
testres
[
wordnum
].
len
==
cwcSrcLen
,
"expected length %d, got %d
\n
"
,
testres
[
wordnum
].
len
,
cwcSrcLen
);
ok
(
!
cwcSrcPos
||
(
testres
[
wordnum
].
ofs
==
cwcSrcPos
),
"expected offset %d, got %d
\n
"
,
testres
[
wordnum
].
ofs
,
cwcSrcPos
);
ok
(
!
memcmp
(
testres
[
wordnum
].
data
,
pwcInBuf
,
cwcSrcLen
),
"expected data %s, got %s
\n
"
,
wine_dbgstr_wn
(
testres
[
wordnum
].
data
,
cwcSrcLen
),
wine_dbgstr_wn
(
pwcInBuf
,
cwcSrcLen
));
}
else
{
ok
(
0
,
"found too many words: %d
\n
"
,
wordnum
+
1
);
rc
=
E_FAIL
;
}
winetest_pop_context
();
wordnum
++
;
return
rc
;
}
...
...
@@ -166,7 +175,7 @@ START_TEST(infosoft)
TEXT_SOURCE
ts
;
r
=
CoInitialize
(
NULL
);
ok
(
r
==
S_OK
,
"failed
\n
"
);
ok
(
r
==
S_OK
,
"failed
: %08x
\n
"
,
r
);
r
=
CoCreateInstance
(
&
CLSID_wb_neutral
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
_IID_IWordBreaker
,
(
LPVOID
)
&
wb
);
...
...
@@ -184,9 +193,9 @@ START_TEST(infosoft)
ts
.
iEnd
=
lstrlenW
(
ts
.
awcBuffer
);
ts
.
iCur
=
0
;
r
=
IWordBreaker_BreakText
(
wb
,
&
ts
,
&
wordsink
.
IWordSink_iface
,
NULL
);
ok
(
r
==
S_OK
,
"failed
\n
"
);
ok
(
r
==
S_OK
,
"failed
: %08x
\n
"
,
r
);
ok
(
wordnum
==
4
,
"
words not processed
\n
"
);
ok
(
wordnum
==
4
,
"
expected 4 words, got %d
\n
"
,
wordnum
);
wordnum
=
0
;
ts
.
pfnFillTextBuffer
=
fillbuf_many
;
...
...
@@ -195,12 +204,12 @@ START_TEST(infosoft)
ts
.
iCur
=
0
;
r
=
fillbuf_many
(
&
ts
);
ok
(
r
==
S_OK
,
"failed
\n
"
);
ok
(
r
==
S_OK
,
"failed
: %08x
\n
"
,
r
);
r
=
IWordBreaker_BreakText
(
wb
,
&
ts
,
&
wordsink
.
IWordSink_iface
,
NULL
);
ok
(
r
==
S_OK
,
"failed
\n
"
);
ok
(
r
==
S_OK
,
"failed
: %08x
\n
"
,
r
);
ok
(
wordnum
==
4
,
"
words not processed
\n
"
);
ok
(
wordnum
==
4
,
"
expected 4 words, got %d
\n
"
,
wordnum
);
IWordBreaker_Release
(
wb
);
CoUninitialize
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment