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
b8e1b138
Commit
b8e1b138
authored
Mar 18, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof/tests: Use ULONG instead of unsigned long.
parent
4de7ac85
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+19
-19
No files found.
dlls/d3dxof/tests/d3dxof.c
View file @
b8e1b138
...
...
@@ -61,7 +61,7 @@ static void init_function_pointers(void)
pDirectXFileCreate
=
(
void
*
)
GetProcAddress
(
hd3dxof
,
"DirectXFileCreate"
);
}
static
unsigned
long
getRefcount
(
IUnknown
*
iface
)
static
ULONG
getRefcount
(
IUnknown
*
iface
)
{
IUnknown_AddRef
(
iface
);
return
IUnknown_Release
(
iface
);
...
...
@@ -70,7 +70,7 @@ static unsigned long getRefcount(IUnknown *iface)
static
void
test_refcount
(
void
)
{
HRESULT
hr
;
unsigned
long
ref
;
ULONG
ref
;
LPDIRECTXFILE
lpDirectXFile
=
NULL
;
LPDIRECTXFILEENUMOBJECT
lpdxfeo
;
LPDIRECTXFILEDATA
lpdxfd
;
...
...
@@ -91,11 +91,11 @@ static void test_refcount(void)
}
ref
=
getRefcount
(
(
IUnknown
*
)
lpDirectXFile
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
IDirectXFile_AddRef
(
lpDirectXFile
);
ok
(
ref
==
2
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
IDirectXFile_Release
(
lpDirectXFile
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
hr
=
IDirectXFile_RegisterTemplates
(
lpDirectXFile
,
template
,
strlen
(
template
));
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileImpl_RegisterTemplates: %x
\n
"
,
hr
);
...
...
@@ -105,36 +105,36 @@ static void test_refcount(void)
hr
=
IDirectXFile_CreateEnumObject
(
lpDirectXFile
,
&
dxflm
,
DXFILELOAD_FROMMEMORY
,
&
lpdxfeo
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFile_CreateEnumObject: %x
\n
"
,
hr
);
ref
=
getRefcount
(
(
IUnknown
*
)
lpDirectXFile
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfeo
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
lpdxfeo
,
&
lpdxfd
);
ok
(
hr
==
DXFILE_OK
,
"IDirectXFileEnumObject_GetNextDataObject: %x
\n
"
,
hr
);
ref
=
getRefcount
(
(
IUnknown
*
)
lpDirectXFile
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfeo
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
/* Enum object gets references to all top level objects */
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfd
);
ok
(
ref
==
2
,
"Got refcount %
l
d, expected 2
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got refcount %d, expected 2
\n
"
,
ref
);
ref
=
IDirectXFile_Release
(
lpDirectXFile
);
ok
(
ref
==
0
,
"Got refcount %
l
d, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
/* Nothing changes for all other objects */
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfeo
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfd
);
ok
(
ref
==
2
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
IDirectXFileEnumObject_Release
(
lpdxfeo
);
ok
(
ref
==
0
,
"Got refcount %
l
d, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
/* Enum object releases references to all top level objects */
ref
=
getRefcount
(
(
IUnknown
*
)
lpdxfd
);
ok
(
ref
==
1
,
"Got refcount %
l
d, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Got refcount %d, expected 1
\n
"
,
ref
);
ref
=
IDirectXFileData_Release
(
lpdxfd
);
ok
(
ref
==
0
,
"Got refcount %
l
d, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
}
/* Set it to 1 to expand the string when dumping the object. This is useful when there is
...
...
@@ -236,7 +236,7 @@ static void process_data(LPDIRECTXFILEDATA lpDirectXFileData, int* plevel)
static
void
test_dump
(
void
)
{
HRESULT
hr
;
unsigned
long
ref
;
ULONG
ref
;
LPDIRECTXFILE
lpDirectXFile
=
NULL
;
LPDIRECTXFILEENUMOBJECT
lpDirectXFileEnumObject
=
NULL
;
LPDIRECTXFILEDATA
lpDirectXFileData
=
NULL
;
...
...
@@ -294,10 +294,10 @@ static void test_dump(void)
ok
(
hr
==
DXFILE_OK
||
hr
==
DXFILEERR_NOMOREOBJECTS
,
"IDirectXFileEnumObject_GetNextDataObject: %x
\n
"
,
hr
);
ref
=
IDirectXFile_Release
(
lpDirectXFileEnumObject
);
ok
(
ref
==
0
,
"Got refcount %
l
d, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
ref
=
IDirectXFile_Release
(
lpDirectXFile
);
ok
(
ref
==
0
,
"Got refcount %
l
d, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"Got refcount %d, expected 0
\n
"
,
ref
);
CloseHandle
(
hFile
);
...
...
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