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
c64aa000
Commit
c64aa000
authored
Nov 15, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler_43/tests: Use CRT allocation functions.
parent
6e45c171
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
19 deletions
+13
-19
asm.c
dlls/d3dcompiler_43/tests/asm.c
+6
-11
hlsl_d3d9.c
dlls/d3dcompiler_43/tests/hlsl_d3d9.c
+7
-8
No files found.
dlls/d3dcompiler_43/tests/asm.c
View file @
c64aa000
...
...
@@ -1460,23 +1460,20 @@ static HRESULT WINAPI testD3DInclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE i
if
(
!
strcmp
(
filename
,
"incl.vsh"
))
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
include
));
CopyMemory
(
buffer
,
include
,
sizeof
(
include
));
buffer
=
strdup
(
include
);
*
bytes
=
sizeof
(
include
);
ok
(
!
parent_data
,
"Wrong parent_data value.
\n
"
);
}
else
if
(
!
strcmp
(
filename
,
"incl2.vsh"
))
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
include2
));
CopyMemory
(
buffer
,
include2
,
sizeof
(
include2
));
buffer
=
strdup
(
include2
);
*
bytes
=
sizeof
(
include2
);
ok
(
!
parent_data
,
"Wrong parent_data value.
\n
"
);
ok
(
include_type
==
D3D_INCLUDE_LOCAL
,
"Wrong include type %d.
\n
"
,
include_type
);
}
else
if
(
!
strcmp
(
filename
,
"incl3.vsh"
))
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
include3
));
CopyMemory
(
buffer
,
include3
,
sizeof
(
include3
));
buffer
=
strdup
(
include3
);
*
bytes
=
sizeof
(
include3
);
/* Also check for the correct parent_data content */
ok
(
parent_data
!=
NULL
...
...
@@ -1486,16 +1483,14 @@ static HRESULT WINAPI testD3DInclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE i
}
else
if
(
!
strcmp
(
filename
,
"incl4.vsh"
))
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
include4
));
CopyMemory
(
buffer
,
include4
,
sizeof
(
include4
));
buffer
=
strdup
(
include4
);
*
bytes
=
sizeof
(
include4
);
ok
(
parent_data
==
NULL
,
"Wrong parent_data value.
\n
"
);
ok
(
include_type
==
D3D_INCLUDE_SYSTEM
,
"Wrong include type %d.
\n
"
,
include_type
);
}
else
if
(
!
strcmp
(
filename
,
"includes/incl.vsh"
))
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
include
));
CopyMemory
(
buffer
,
include
,
sizeof
(
include
));
buffer
=
strdup
(
include
);
*
bytes
=
sizeof
(
include
);
ok
(
!
parent_data
,
"Wrong parent_data value.
\n
"
);
}
...
...
@@ -1512,7 +1507,7 @@ static HRESULT WINAPI testD3DInclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE i
static
HRESULT
WINAPI
testD3DInclude_close
(
ID3DInclude
*
iface
,
const
void
*
data
)
{
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
data
);
free
(
(
void
*
)
data
);
return
S_OK
;
}
...
...
dlls/d3dcompiler_43/tests/hlsl_d3d9.c
View file @
c64aa000
...
...
@@ -18,7 +18,6 @@
*/
#define COBJMACROS
#include "wine/test.h"
#include "wine/heap.h"
#include "d3dx9.h"
#include "d3dcompiler.h"
...
...
@@ -1515,26 +1514,26 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
if
(
!
strcmp
(
filename
,
"include1.h"
))
{
buffer
=
heap_alloc
(
strlen
(
include1
));
CopyMemory
(
buffer
,
include1
,
strlen
(
include1
));
buffer
=
strdup
(
include1
);
*
bytes
=
strlen
(
include1
);
buffer
[
*
bytes
]
=
'$'
;
/* everything should still work without a null terminator */
ok
(
include_type
==
D3D_INCLUDE_LOCAL
,
"Unexpected include type %d.
\n
"
,
include_type
);
ok
(
!
strncmp
(
include2
,
parent_data
,
strlen
(
include2
))
||
!
strncmp
(
include3
,
parent_data
,
strlen
(
include3
)),
"Unexpected parent_data value.
\n
"
);
}
else
if
(
!
strcmp
(
filename
,
"include
\\
include2.h"
))
{
buffer
=
heap_alloc
(
strlen
(
include2
));
CopyMemory
(
buffer
,
include2
,
strlen
(
include2
));
buffer
=
strdup
(
include2
);
*
bytes
=
strlen
(
include2
);
buffer
[
*
bytes
]
=
'$'
;
/* everything should still work without a null terminator */
ok
(
!
parent_data
,
"Unexpected parent_data value.
\n
"
);
ok
(
include_type
==
D3D_INCLUDE_LOCAL
,
"Unexpected include type %d.
\n
"
,
include_type
);
}
else
if
(
!
strcmp
(
filename
,
"include
\\
include3.h"
))
{
buffer
=
heap_alloc
(
strlen
(
include3
));
CopyMemory
(
buffer
,
include3
,
strlen
(
include3
));
buffer
=
strdup
(
include3
);
*
bytes
=
strlen
(
include3
);
buffer
[
*
bytes
]
=
'$'
;
/* everything should still work without a null terminator */
ok
(
!
parent_data
,
"Unexpected parent_data value.
\n
"
);
ok
(
include_type
==
D3D_INCLUDE_LOCAL
,
"Unexpected include type %d.
\n
"
,
include_type
);
}
...
...
@@ -1550,7 +1549,7 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE
static
HRESULT
WINAPI
test_d3dinclude_close
(
ID3DInclude
*
iface
,
const
void
*
data
)
{
heap_
free
((
void
*
)
data
);
free
((
void
*
)
data
);
return
S_OK
;
}
...
...
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