Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
34c9586b
Commit
34c9586b
authored
Jun 01, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Split up test_coop_level_surf_create().
parent
d61d8426
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
76 deletions
+96
-76
d3d.c
dlls/ddraw/tests/d3d.c
+0
-76
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+24
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+24
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+24
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+24
-0
No files found.
dlls/ddraw/tests/d3d.c
View file @
34c9586b
...
@@ -3626,80 +3626,6 @@ static void z_format_test(void)
...
@@ -3626,80 +3626,6 @@ static void z_format_test(void)
ok
(
count
,
"Expected at least one supported Z Buffer format
\n
"
);
ok
(
count
,
"Expected at least one supported Z Buffer format
\n
"
);
}
}
static
void
test_coop_level_surf_create
(
void
)
{
IDirectDrawSurface7
*
surface7
;
IDirectDrawSurface4
*
surface4
;
IDirectDrawSurface
*
surface1
;
IDirectDraw7
*
ddraw7
;
IDirectDraw4
*
ddraw4
;
IDirectDraw2
*
ddraw2
;
IDirectDraw
*
ddraw1
;
DDSURFACEDESC2
ddsd2
;
DDSURFACEDESC
ddsd
;
HRESULT
hr
;
/* IDirectDraw */
if
(
FAILED
(
hr
=
DirectDrawCreate
(
NULL
,
&
ddraw1
,
NULL
)))
{
skip
(
"Failed to create IDirectDraw object (%#x), skipping tests.
\n
"
,
hr
);
return
;
}
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw_CreateSurface
(
ddraw1
,
&
ddsd
,
&
surface1
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
/* IDirectDraw2 */
if
(
SUCCEEDED
(
IDirectDraw_QueryInterface
(
ddraw1
,
&
IID_IDirectDraw2
,
(
void
**
)
&
ddraw2
)))
{
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw2_CreateSurface
(
ddraw2
,
&
ddsd
,
&
surface1
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw2_Release
(
ddraw2
);
}
else
skip
(
"Failed to query IDirectDraw2 interface, skipping tests.
\n
"
);
/* IDirectDraw4 */
if
(
SUCCEEDED
(
IDirectDraw_QueryInterface
(
ddraw1
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
)))
{
memset
(
&
ddsd2
,
0
,
sizeof
(
ddsd2
));
ddsd2
.
dwSize
=
sizeof
(
ddsd2
);
ddsd2
.
dwFlags
=
DDSD_CAPS
;
ddsd2
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw4
,
&
ddsd2
,
&
surface4
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
}
else
skip
(
"Failed to query IDirectDraw4 interface, skipping tests.
\n
"
);
IDirectDraw_Release
(
ddraw1
);
/* IDirectDraw7 */
if
(
FAILED
(
hr
=
pDirectDrawCreateEx
(
NULL
,
(
void
**
)
&
ddraw7
,
&
IID_IDirectDraw7
,
NULL
)))
{
skip
(
"Failed to create IDirectDraw7 object (%#x), skipping tests.
\n
"
,
hr
);
return
;
}
memset
(
&
ddsd2
,
0
,
sizeof
(
ddsd2
));
ddsd2
.
dwSize
=
sizeof
(
ddsd2
);
ddsd2
.
dwFlags
=
DDSD_CAPS
;
ddsd2
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw7
,
&
ddsd2
,
&
surface7
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw7_Release
(
ddraw7
);
}
static
void
test_get_caps1
(
void
)
static
void
test_get_caps1
(
void
)
{
{
D3DDEVICEDESC
hw_caps
,
hel_caps
;
D3DDEVICEDESC
hw_caps
,
hel_caps
;
...
@@ -4053,6 +3979,4 @@ START_TEST(d3d)
...
@@ -4053,6 +3979,4 @@ START_TEST(d3d)
test_get_caps1
();
test_get_caps1
();
D3D1_releaseObjects
();
D3D1_releaseObjects
();
}
}
test_coop_level_surf_create
();
}
}
dlls/ddraw/tests/ddraw1.c
View file @
34c9586b
...
@@ -2414,6 +2414,29 @@ static void test_initialize(void)
...
@@ -2414,6 +2414,29 @@ static void test_initialize(void)
}
}
}
}
static
void
test_coop_level_surf_create
(
void
)
{
IDirectDrawSurface
*
surface
;
IDirectDraw
*
ddraw
;
DDSURFACEDESC
ddsd
;
HRESULT
hr
;
if
(
!
(
ddraw
=
create_ddraw
()))
{
skip
(
"Failed to create a ddraw object, skipping test.
\n
"
);
return
;
}
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw_Release
(
ddraw
);
}
START_TEST
(
ddraw1
)
START_TEST
(
ddraw1
)
{
{
test_coop_level_create_device_window
();
test_coop_level_create_device_window
();
...
@@ -2432,4 +2455,5 @@ START_TEST(ddraw1)
...
@@ -2432,4 +2455,5 @@ START_TEST(ddraw1)
test_redundant_mode_set
();
test_redundant_mode_set
();
test_coop_level_mode_set
();
test_coop_level_mode_set
();
test_initialize
();
test_initialize
();
test_coop_level_surf_create
();
}
}
dlls/ddraw/tests/ddraw2.c
View file @
34c9586b
...
@@ -2533,6 +2533,29 @@ static void test_initialize(void)
...
@@ -2533,6 +2533,29 @@ static void test_initialize(void)
CoUninitialize
();
CoUninitialize
();
}
}
static
void
test_coop_level_surf_create
(
void
)
{
IDirectDrawSurface
*
surface
;
IDirectDraw2
*
ddraw
;
DDSURFACEDESC
ddsd
;
HRESULT
hr
;
if
(
!
(
ddraw
=
create_ddraw
()))
{
skip
(
"Failed to create a ddraw object, skipping test.
\n
"
);
return
;
}
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw2_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw2_Release
(
ddraw
);
}
START_TEST
(
ddraw2
)
START_TEST
(
ddraw2
)
{
{
test_coop_level_create_device_window
();
test_coop_level_create_device_window
();
...
@@ -2553,4 +2576,5 @@ START_TEST(ddraw2)
...
@@ -2553,4 +2576,5 @@ START_TEST(ddraw2)
test_redundant_mode_set
();
test_redundant_mode_set
();
test_coop_level_mode_set
();
test_coop_level_mode_set
();
test_initialize
();
test_initialize
();
test_coop_level_surf_create
();
}
}
dlls/ddraw/tests/ddraw4.c
View file @
34c9586b
...
@@ -2648,6 +2648,29 @@ static void test_initialize(void)
...
@@ -2648,6 +2648,29 @@ static void test_initialize(void)
CoUninitialize
();
CoUninitialize
();
}
}
static
void
test_coop_level_surf_create
(
void
)
{
IDirectDrawSurface4
*
surface
;
IDirectDraw4
*
ddraw
;
DDSURFACEDESC2
ddsd
;
HRESULT
hr
;
if
(
!
(
ddraw
=
create_ddraw
()))
{
skip
(
"Failed to create a ddraw object, skipping test.
\n
"
);
return
;
}
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw4_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw
);
}
START_TEST
(
ddraw4
)
START_TEST
(
ddraw4
)
{
{
test_process_vertices
();
test_process_vertices
();
...
@@ -2669,4 +2692,5 @@ START_TEST(ddraw4)
...
@@ -2669,4 +2692,5 @@ START_TEST(ddraw4)
test_redundant_mode_set
();
test_redundant_mode_set
();
test_coop_level_mode_set
();
test_coop_level_mode_set
();
test_initialize
();
test_initialize
();
test_coop_level_surf_create
();
}
}
dlls/ddraw/tests/ddraw7.c
View file @
34c9586b
...
@@ -2457,6 +2457,29 @@ static void test_initialize(void)
...
@@ -2457,6 +2457,29 @@ static void test_initialize(void)
CoUninitialize
();
CoUninitialize
();
}
}
static
void
test_coop_level_surf_create
(
void
)
{
IDirectDrawSurface7
*
surface
;
IDirectDraw7
*
ddraw
;
DDSURFACEDESC2
ddsd
;
HRESULT
hr
;
if
(
!
(
ddraw
=
create_ddraw
()))
{
skip
(
"Failed to create a ddraw object, skipping test.
\n
"
);
return
;
}
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
hr
==
DDERR_NOCOOPERATIVELEVELSET
,
"Surface creation returned hr %#x.
\n
"
,
hr
);
IDirectDraw7_Release
(
ddraw
);
}
START_TEST
(
ddraw7
)
START_TEST
(
ddraw7
)
{
{
HMODULE
module
=
GetModuleHandleA
(
"ddraw.dll"
);
HMODULE
module
=
GetModuleHandleA
(
"ddraw.dll"
);
...
@@ -2485,4 +2508,5 @@ START_TEST(ddraw7)
...
@@ -2485,4 +2508,5 @@ START_TEST(ddraw7)
test_redundant_mode_set
();
test_redundant_mode_set
();
test_coop_level_mode_set
();
test_coop_level_mode_set
();
test_initialize
();
test_initialize
();
test_coop_level_surf_create
();
}
}
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