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
69870ee8
Commit
69870ee8
authored
Jan 02, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/tests: Add some tests for minimum/maximum input count in effect description.
parent
a634c30f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
d2d1.c
dlls/d2d1/tests/d2d1.c
+42
-0
No files found.
dlls/d2d1/tests/d2d1.c
View file @
69870ee8
...
...
@@ -220,6 +220,21 @@ L"<?xml version='1.0'?> \
</Effect> \
"
;
static
const
WCHAR
*
effect_variable_input_count
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='VariableInputs'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Test'/> \
<Property name='Description' type='string' value='Test effect.'/> \
<Inputs minimum='2' maximum='5' > \
<Input name='Source1'/> \
<Input name='Source2'/> \
<Input name='Source3'/> \
</Inputs> \
</Effect> \
"
;
static
const
DWORD
test_vs
[]
=
{
#if 0
...
...
@@ -11451,6 +11466,33 @@ static void test_effect_register(BOOL d3d11)
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_D2D1Composite
);
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Variable input count. */
hr
=
ID2D1Factory1_RegisterEffectFromString
(
factory
,
&
CLSID_TestEffect
,
effect_variable_input_count
,
NULL
,
0
,
effect_impl_create
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1DeviceContext_CreateEffect
(
device_context
,
&
CLSID_TestEffect
,
&
effect
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
integer
=
0
;
hr
=
ID2D1Effect_GetValue
(
effect
,
D2D1_PROPERTY_MIN_INPUTS
,
D2D1_PROPERTY_TYPE_UINT32
,
(
BYTE
*
)
&
integer
,
sizeof
(
integer
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
integer
==
2
,
"Unexpected value %u.
\n
"
,
integer
);
hr
=
ID2D1Effect_GetValue
(
effect
,
D2D1_PROPERTY_MAX_INPUTS
,
D2D1_PROPERTY_TYPE_UINT32
,
(
BYTE
*
)
&
integer
,
sizeof
(
integer
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
integer
==
5
,
"Unexpected value %u.
\n
"
,
integer
);
hr
=
ID2D1Effect_GetValue
(
effect
,
D2D1_PROPERTY_INPUTS
,
D2D1_PROPERTY_TYPE_ARRAY
,
(
BYTE
*
)
&
integer
,
sizeof
(
integer
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
integer
==
3
,
"Unexpected data %u.
\n
"
,
integer
);
ID2D1Effect_Release
(
effect
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
release_test_context
(
&
ctx
);
}
...
...
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