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
aaf2ef41
Commit
aaf2ef41
authored
Feb 01, 2010
by
Christian Costa
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Add some tests.
parent
29c4055f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
1 deletion
+104
-1
Makefile.in
dlls/d3drm/tests/Makefile.in
+3
-1
d3drm.c
dlls/d3drm/tests/d3drm.c
+101
-0
No files found.
dlls/d3drm/tests/Makefile.in
View file @
aaf2ef41
...
@@ -5,7 +5,9 @@ VPATH = @srcdir@
...
@@ -5,7 +5,9 @@ VPATH = @srcdir@
TESTDLL
=
d3drm.dll
TESTDLL
=
d3drm.dll
IMPORTS
=
kernel32
IMPORTS
=
kernel32
CTESTS
=
vector.c
CTESTS
=
\
d3drm.c
\
vector.c
@MAKE_TEST_RULES@
@MAKE_TEST_RULES@
...
...
dlls/d3drm/tests/d3drm.c
0 → 100644
View file @
aaf2ef41
/*
* Copyright 2010 Christian Costa
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "d3drm.h"
#include "wine/test.h"
static
HMODULE
d3drm_handle
=
0
;
static
HRESULT
(
WINAPI
*
pDirect3DRMCreate
)(
LPDIRECT3DRM
*
ppDirect3DRM
);
#define D3DRM_GET_PROC(func) \
p ## func = (void*)GetProcAddress(d3drm_handle, #func); \
if(!p ## func) { \
trace("GetProcAddress(%s) failed\n", #func); \
FreeLibrary(d3drm_handle); \
return FALSE; \
}
static
BOOL
InitFunctionPtrs
(
void
)
{
d3drm_handle
=
LoadLibraryA
(
"d3drm.dll"
);
if
(
!
d3drm_handle
)
{
skip
(
"Could not load d3drm.dll
\n
"
);
return
FALSE
;
}
D3DRM_GET_PROC
(
Direct3DRMCreate
)
return
TRUE
;
}
char
data_ok
[]
=
"xof 0302txt 0064
\n
"
"Mesh Object
\n
"
"{
\n
"
"0;
\n
"
"0;
\n
"
"}
\n
"
;
char
data_bad
[]
=
"xof 0302txt 0064
\n
"
"Header Object
\n
"
"{
\n
"
"1; 2; 3;
\n
"
"}
\n
"
;
void
Test
(
void
)
{
HRESULT
hr
;
LPDIRECT3DRM
pD3DRM
;
LPDIRECT3DRMMESHBUILDER
pMeshBuilder
;
D3DRMLOADMEMORY
info
;
hr
=
pDirect3DRMCreate
(
&
pD3DRM
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateMeshBuilder
(
pD3DRM
,
&
pMeshBuilder
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMMeshBuilder interface (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_bad
;
info
.
dSize
=
sizeof
(
data_bad
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DRMERR_BADFILE
,
"Sould have returned D3DRMERR_BADFILE (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_ok
;
info
.
dSize
=
sizeof
(
data_ok
);
hr
=
IDirect3DRMMeshBuilder_Load
(
pMeshBuilder
,
&
info
,
NULL
,
D3DRMLOAD_FROMMEMORY
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot load mesh data (hr = %x)
\n
"
,
hr
);
IDirect3DRMMeshBuilder_Release
(
pMeshBuilder
);
IDirect3DRM_Release
(
pD3DRM
);
}
START_TEST
(
d3drm
)
{
if
(
!
InitFunctionPtrs
())
return
;
Test
();
FreeLibrary
(
d3drm_handle
);
}
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