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
13a4da53
Commit
13a4da53
authored
Apr 08, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add some GetProcessHeaps tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
93d5aba8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
heap.c
dlls/kernel32/tests/heap.c
+18
-1
No files found.
dlls/kernel32/tests/heap.c
View file @
13a4da53
...
...
@@ -80,23 +80,40 @@ static void test_HeapCreate(void)
{
static
const
BYTE
buffer
[
512
]
=
{
0
};
SIZE_T
alloc_size
=
0x8000
*
sizeof
(
void
*
),
size
,
i
;
HANDLE
heap
,
heap1
,
heaps
[
8
];
BYTE
*
ptr
,
*
ptr1
,
*
ptrs
[
128
];
HANDLE
heap
,
heap1
;
DWORD
heap_count
,
count
;
UINT_PTR
align
;
BOOL
ret
;
heap_count
=
GetProcessHeaps
(
0
,
NULL
);
ok
(
heap_count
<=
6
,
"GetProcessHeaps returned %lu
\n
"
,
heap_count
);
/* check heap alignment */
heap
=
HeapCreate
(
0
,
0
,
0
);
ok
(
!!
heap
,
"HeapCreate failed, error %lu
\n
"
,
GetLastError
()
);
ok
(
!
((
ULONG_PTR
)
heap
&
0xffff
),
"wrong heap alignment
\n
"
);
count
=
GetProcessHeaps
(
0
,
NULL
);
ok
(
count
==
heap_count
+
1
,
"GetProcessHeaps returned %lu
\n
"
,
count
);
heap1
=
HeapCreate
(
0
,
0
,
0
);
ok
(
!!
heap
,
"HeapCreate failed, error %lu
\n
"
,
GetLastError
()
);
ok
(
!
((
ULONG_PTR
)
heap1
&
0xffff
),
"wrong heap alignment
\n
"
);
count
=
GetProcessHeaps
(
0
,
NULL
);
ok
(
count
==
heap_count
+
2
,
"GetProcessHeaps returned %lu
\n
"
,
count
);
count
=
GetProcessHeaps
(
ARRAY_SIZE
(
heaps
),
heaps
);
ok
(
count
==
heap_count
+
2
,
"GetProcessHeaps returned %lu
\n
"
,
count
);
ok
(
heaps
[
0
]
==
GetProcessHeap
(),
"got wrong heap
\n
"
);
todo_wine
ok
(
heaps
[
heap_count
+
0
]
==
heap
,
"got wrong heap
\n
"
);
todo_wine
ok
(
heaps
[
heap_count
+
1
]
==
heap1
,
"got wrong heap
\n
"
);
ret
=
HeapDestroy
(
heap1
);
ok
(
ret
,
"HeapDestroy failed, error %lu
\n
"
,
GetLastError
()
);
ret
=
HeapDestroy
(
heap
);
ok
(
ret
,
"HeapDestroy failed, error %lu
\n
"
,
GetLastError
()
);
count
=
GetProcessHeaps
(
0
,
NULL
);
ok
(
count
==
heap_count
,
"GetProcessHeaps returned %lu
\n
"
,
count
);
/* growable heap */
...
...
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