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
1ff3264d
Commit
1ff3264d
authored
Feb 15, 2016
by
André Hentschel
Committed by
Alexandre Julliard
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Use todo_wine_if() in tests.
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ad1a4ecd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
36 deletions
+11
-36
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+2
-9
image.c
dlls/gdiplus/tests/image.c
+4
-10
metafile.c
dlls/gdiplus/tests/metafile.c
+5
-17
No files found.
dlls/gdiplus/tests/graphicspath.c
View file @
1ff3264d
...
...
@@ -87,10 +87,7 @@ static void ok_path(GpPath* path, const path_test_t *expected, INT expected_size
return
;
}
if
(
todo_size
)
todo_wine
ok
(
size
==
expected_size
,
"Path size %d does not match expected size %d
\n
"
,
size
,
expected_size
);
else
todo_wine_if
(
todo_size
)
ok
(
size
==
expected_size
,
"Path size %d does not match expected size %d
\n
"
,
size
,
expected_size
);
...
...
@@ -113,11 +110,7 @@ static void ok_path(GpPath* path, const path_test_t *expected, INT expected_size
stringify_point_type
(
expected
[
eidx
].
type
,
ename
);
stringify_point_type
(
types
[
idx
],
name
);
if
(
expected
[
eidx
].
todo
||
numskip
)
todo_wine
ok
(
match
,
"Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)
\n
"
,
eidx
,
ename
,
expected
[
eidx
].
X
,
expected
[
eidx
].
Y
,
name
,
points
[
idx
].
X
,
points
[
idx
].
Y
);
else
todo_wine_if
(
expected
[
eidx
].
todo
||
numskip
)
ok
(
match
,
"Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)
\n
"
,
eidx
,
ename
,
expected
[
eidx
].
X
,
expected
[
eidx
].
Y
,
name
,
points
[
idx
].
X
,
points
[
idx
].
Y
);
...
...
dlls/gdiplus/tests/image.c
View file @
1ff3264d
...
...
@@ -55,9 +55,7 @@ static void expect_guid(REFGUID expected, REFGUID got, int line, BOOL todo)
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
bufferW
[
0
]),
buffer
,
sizeof
(
buffer
),
NULL
,
NULL
);
StringFromGUID2
(
expected
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
bufferW
[
0
]));
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
bufferW
[
0
]),
buffer2
,
sizeof
(
buffer2
),
NULL
,
NULL
);
if
(
todo
)
todo_wine
ok_
(
__FILE__
,
line
)(
IsEqualGUID
(
expected
,
got
),
"Expected %s, got %s
\n
"
,
buffer2
,
buffer
);
else
todo_wine_if
(
todo
)
ok_
(
__FILE__
,
line
)(
IsEqualGUID
(
expected
,
got
),
"Expected %s, got %s
\n
"
,
buffer2
,
buffer
);
}
...
...
@@ -4298,10 +4296,8 @@ static void test_DrawImage_scale(void)
expect
(
Ok
,
status
);
match
=
memcmp
(
dst_8x1
,
td
[
i
].
image
,
sizeof
(
dst_8x1
))
==
0
;
if
(
!
match
&&
td
[
i
].
todo
)
todo_wine
ok
(
match
,
"%d: data should match
\n
"
,
i
);
else
ok
(
match
,
"%d: data should match
\n
"
,
i
);
todo_wine_if
(
!
match
&&
td
[
i
].
todo
)
ok
(
match
,
"%d: data should match
\n
"
,
i
);
if
(
!
match
)
{
UINT
i
,
size
=
sizeof
(
dst_8x1
);
...
...
@@ -4679,9 +4675,7 @@ static void test_supported_encoders(void)
ok
(
hr
==
S_OK
,
"CreateStreamOnHGlobal error %#x
\n
"
,
hr
);
status
=
GdipSaveImageToStream
((
GpImage
*
)
bm
,
stream
,
&
clsid
,
NULL
);
if
(
td
[
i
].
todo
)
todo_wine
ok
(
status
==
Ok
,
"GdipSaveImageToStream error %d
\n
"
,
status
);
else
todo_wine_if
(
td
[
i
].
todo
)
ok
(
status
==
Ok
,
"GdipSaveImageToStream error %d
\n
"
,
status
);
IStream_Release
(
stream
);
...
...
dlls/gdiplus/tests/metafile.c
View file @
1ff3264d
...
...
@@ -47,11 +47,7 @@ typedef struct emfplus_check_state
static
void
check_record
(
int
count
,
const
char
*
desc
,
const
struct
emfplus_record
*
expected
,
const
struct
emfplus_record
*
actual
)
{
if
(
expected
->
todo
)
todo_wine
ok
(
expected
->
record_type
==
actual
->
record_type
,
"%s.%i: Expected record type 0x%x, got 0x%x
\n
"
,
desc
,
count
,
expected
->
record_type
,
actual
->
record_type
);
else
todo_wine_if
(
expected
->
todo
)
ok
(
expected
->
record_type
==
actual
->
record_type
,
"%s.%i: Expected record type 0x%x, got 0x%x
\n
"
,
desc
,
count
,
expected
->
record_type
,
actual
->
record_type
);
...
...
@@ -142,9 +138,7 @@ static void check_emfplus(HENHMETAFILE hemf, const emfplus_record *expected, con
EnumEnhMetaFile
(
0
,
hemf
,
enum_emf_proc
,
&
state
,
NULL
);
if
(
expected
[
state
.
count
].
todo
)
todo_wine
ok
(
expected
[
state
.
count
].
record_type
==
0
,
"%s: Got %i records, expecting more
\n
"
,
desc
,
state
.
count
);
else
todo_wine_if
(
expected
[
state
.
count
].
todo
)
ok
(
expected
[
state
.
count
].
record_type
==
0
,
"%s: Got %i records, expecting more
\n
"
,
desc
,
state
.
count
);
}
...
...
@@ -196,9 +190,7 @@ static void check_metafile(GpMetafile *metafile, const emfplus_record *expected,
3
,
src_rect
,
src_unit
,
enum_metafile_proc
,
&
state
,
NULL
);
expect
(
Ok
,
stat
);
if
(
expected
[
state
.
count
].
todo
)
todo_wine
ok
(
expected
[
state
.
count
].
record_type
==
0
,
"%s: Got %i records, expecting more
\n
"
,
desc
,
state
.
count
);
else
todo_wine_if
(
expected
[
state
.
count
].
todo
)
ok
(
expected
[
state
.
count
].
record_type
==
0
,
"%s: Got %i records, expecting more
\n
"
,
desc
,
state
.
count
);
GdipDeleteGraphics
(
graphics
);
...
...
@@ -216,17 +208,13 @@ static BOOL CALLBACK play_metafile_proc(EmfPlusRecordType record_type, unsigned
if
(
state
->
expected
[
state
->
count
].
record_type
)
{
if
(
state
->
expected
[
state
->
count
].
playback_todo
)
todo_wine
ok
(
stat
==
Ok
,
"%s.%i: GdipPlayMetafileRecord failed with stat %i
\n
"
,
state
->
desc
,
state
->
count
,
stat
);
else
todo_wine_if
(
state
->
expected
[
state
->
count
].
playback_todo
)
ok
(
stat
==
Ok
,
"%s.%i: GdipPlayMetafileRecord failed with stat %i
\n
"
,
state
->
desc
,
state
->
count
,
stat
);
state
->
count
++
;
}
else
{
if
(
state
->
expected
[
state
->
count
].
playback_todo
)
todo_wine
ok
(
0
,
"%s: too many records
\n
"
,
state
->
desc
);
else
todo_wine_if
(
state
->
expected
[
state
->
count
].
playback_todo
)
ok
(
0
,
"%s: too many records
\n
"
,
state
->
desc
);
return
FALSE
;
...
...
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