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
d84210f0
Commit
d84210f0
authored
Jul 12, 2023
by
Jeff Smith
Committed by
Alexandre Julliard
Jul 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Pare down image property tests that are not run for Wine.
parent
7c8a4c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
61 deletions
+41
-61
image.c
dlls/gdiplus/tests/image.c
+41
-61
No files found.
dlls/gdiplus/tests/image.c
View file @
d84210f0
...
...
@@ -3679,7 +3679,7 @@ static void test_image_properties(void)
{
gifimage
,
sizeof
(
gifimage
),
ImageTypeBitmap
,
1
,
4
,
4
,
~
0
,
0x5100
,
~
0
,
16
},
{
wmfimage
,
sizeof
(
wmfimage
),
ImageTypeMetafile
,
0
,
~
0
,
0
,
~
0
,
0
,
~
0
,
-
GenericError
}
};
GpStatus
status
;
GpStatus
status
,
expected
;
GpImage
*
image
;
UINT
prop_count
,
prop_size
,
i
;
PROPID
prop_id
[
16
]
=
{
0
};
...
...
@@ -3750,78 +3750,58 @@ static void test_image_properties(void)
else
expect
(
PropertyNotFound
,
status
);
/* FIXME: remove once Wine is fixed */
if
(
!
(
td
[
i
].
prop_count
==
prop_count
||
(
td
[
i
].
prop_count2
!=
~
0
&&
td
[
i
].
prop_count2
==
prop_count
)))
{
GdipDisposeImage
(
image
);
winetest_pop_context
();
continue
;
}
status
=
GdipGetPropertyIdList
(
NULL
,
prop_count
,
prop_id
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertyIdList
(
image
,
prop_count
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPropertyIdList
(
image
,
0
,
prop_id
);
if
(
image_type
==
ImageTypeMetafile
)
expect
(
NotImplemented
,
status
);
else
if
(
prop_count
==
0
)
expect
(
Ok
,
status
);
else
expect
(
InvalidParameter
,
status
);
expected
=
(
image_type
==
ImageTypeMetafile
)
?
NotImplemented
:
InvalidParameter
;
status
=
GdipGetPropertyIdList
(
image
,
prop_count
-
1
,
prop_id
);
if
(
image_type
==
ImageTypeMetafile
)
expect
(
NotImplemented
,
status
);
else
expect
(
InvalidParameter
,
status
);
expect
(
expected
,
status
);
status
=
GdipGetPropertyIdList
(
image
,
prop_count
+
1
,
prop_id
);
if
(
image_type
==
ImageTypeMetafile
)
expect
(
NotImplemented
,
status
);
else
expect
(
InvalidParameter
,
status
);
expect
(
expected
,
status
);
if
(
image_type
!=
ImageTypeMetafile
&&
prop_count
==
0
)
expected
=
Ok
;
status
=
GdipGetPropertyIdList
(
image
,
0
,
prop_id
);
expect
(
expected
,
status
);
expected
=
(
image_type
==
ImageTypeMetafile
)
?
NotImplemented
:
Ok
;
status
=
GdipGetPropertyIdList
(
image
,
prop_count
,
prop_id
);
expect
(
expected
,
status
);
status
=
GdipGetPropertyItemSize
(
image
,
prop_id
[
0
],
&
prop_size
);
if
(
image_type
==
ImageTypeMetafile
)
expect
(
NotImplemented
,
status
);
else
else
if
(
prop_count
==
0
)
expect
(
PropertyNotFound
,
status
);
/* FIXME: remove condition once Wine is fixed, i.e. this should just be an else */
else
if
(
td
[
i
].
prop_count
==
prop_count
||
(
td
[
i
].
prop_count2
!=
~
0
&&
td
[
i
].
prop_count2
==
prop_count
))
{
expect
(
Ok
,
status
);
if
(
prop_count
!=
0
)
ok
(
td
[
i
].
prop_id
==
prop_id
[
0
]
||
(
td
[
i
].
prop_id2
!=
~
0
&&
td
[
i
].
prop_id2
==
prop_id
[
0
]),
"expected property id %#x or %#x, got %#lx
\n
"
,
td
[
i
].
prop_id
,
td
[
i
].
prop_id2
,
prop_id
[
0
]);
}
ok
(
td
[
i
].
prop_id
==
prop_id
[
0
]
||
(
td
[
i
].
prop_id2
!=
~
0
&&
td
[
i
].
prop_id2
==
prop_id
[
0
]),
"expected property id %#x or %#x, got %#lx
\n
"
,
td
[
i
].
prop_id
,
td
[
i
].
prop_id2
,
prop_id
[
0
]);
if
(
status
==
Ok
)
{
status
=
GdipGetPropertyItemSize
(
image
,
prop_id
[
0
],
&
prop_size
);
if
(
prop_count
==
0
)
expect
(
PropertyNotFound
,
status
);
else
{
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
assert
(
sizeof
(
item
)
>=
prop_size
);
ok
(
prop_size
>
sizeof
(
PropertyItem
),
"got too small prop_size %u
\n
"
,
prop_size
);
ok
(
td
[
i
].
prop_size
+
sizeof
(
PropertyItem
)
==
prop_size
||
(
td
[
i
].
prop_size2
!=
~
0
&&
td
[
i
].
prop_size2
+
sizeof
(
PropertyItem
)
==
prop_size
),
"expected property size (%u or %u)+%u, got %u
\n
"
,
td
[
i
].
prop_size
,
td
[
i
].
prop_size2
,
(
UINT
)
sizeof
(
PropertyItem
),
prop_size
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
0
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
-
1
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
+
1
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
,
&
item
.
data
);
expect
(
Ok
,
status
);
ok
(
prop_id
[
0
]
==
item
.
data
.
id
,
"expected property id %#lx, got %#lx
\n
"
,
prop_id
[
0
],
item
.
data
.
id
);
}
assert
(
sizeof
(
item
)
>=
prop_size
);
ok
(
prop_size
>
sizeof
(
PropertyItem
),
"got too small prop_size %u
\n
"
,
prop_size
);
ok
(
td
[
i
].
prop_size
+
sizeof
(
PropertyItem
)
==
prop_size
||
(
td
[
i
].
prop_size2
!=
~
0
&&
td
[
i
].
prop_size2
+
sizeof
(
PropertyItem
)
==
prop_size
),
"expected property size (%u or %u)+%u, got %u
\n
"
,
td
[
i
].
prop_size
,
td
[
i
].
prop_size2
,
(
UINT
)
sizeof
(
PropertyItem
),
prop_size
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
0
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
-
1
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
+
1
,
&
item
.
data
);
ok
(
status
==
InvalidParameter
||
status
==
GenericError
/* Win7 */
,
"expected InvalidParameter, got %d
\n
"
,
status
);
status
=
GdipGetPropertyItem
(
image
,
prop_id
[
0
],
prop_size
,
&
item
.
data
);
expect
(
Ok
,
status
);
ok
(
prop_id
[
0
]
==
item
.
data
.
id
,
"expected property id %#lx, got %#lx
\n
"
,
prop_id
[
0
],
item
.
data
.
id
);
}
GdipDisposeImage
(
image
);
...
...
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