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
0abe7b4e
Commit
0abe7b4e
authored
Jun 14, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp120: Add alloc/free count validation tests in _Concurrent_vector_base_v4.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
905aa3cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+5
-0
No files found.
dlls/msvcp120/tests/msvcp120.c
View file @
0abe7b4e
...
...
@@ -25,6 +25,7 @@
#include "winbase.h"
DWORD
expect_idx
;
static
int
vector_alloc_count
;
#define DEFINE_EXPECT(func) \
BOOL expect_ ## func, called_ ## func
...
...
@@ -2451,6 +2452,7 @@ static DWORD WINAPI queue_pop_thread(void*arg)
static
void
*
__cdecl
concurrent_vector_int_alloc
(
vector_base_v4
*
this
,
size_t
n
)
{
CHECK_EXPECT
(
concurrent_vector_int_alloc
);
vector_alloc_count
++
;
return
malloc
(
n
*
sizeof
(
int
));
}
...
...
@@ -2474,6 +2476,7 @@ static void concurrent_vector_int_dtor(vector_base_v4 *this)
blocks
=
(
size_t
)
call_func2
(
p_vector_base_v4__Internal_clear
,
this
,
concurrent_vector_int_destroy
);
while
(
this
->
first_block
&&
blocks
>=
this
->
first_block
)
{
vector_alloc_count
--
;
free
(
this
->
segment
[
blocks
-
this
->
first_block
]);
blocks
--
;
}
...
...
@@ -2755,6 +2758,8 @@ static void test_vector_base_v4(void)
ok
(
vector
.
early_size
==
0
,
"vector.early_size got %ld expected 0
\n
"
,
(
long
)
vector
.
early_size
);
concurrent_vector_int_dtor
(
&
vector
);
ok
(
!
vector_alloc_count
,
"vector_alloc_count = %d, expected 0
\n
"
,
vector_alloc_count
);
}
START_TEST
(
msvcp120
)
...
...
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