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
c3ee5751
Commit
c3ee5751
authored
Jan 21, 2024
by
Daniel Lehman
Committed by
Alexandre Julliard
Jan 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp120/tests: Add some tests for _Mtx_t fields.
parent
d9c4b56e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+10
-0
No files found.
dlls/msvcp120/tests/msvcp120.c
View file @
c3ee5751
...
@@ -2429,18 +2429,28 @@ static void test__Mtx(void)
...
@@ -2429,18 +2429,28 @@ static void test__Mtx(void)
r
=
p__Mtx_init
(
&
mtx
,
flags
[
i
]);
r
=
p__Mtx_init
(
&
mtx
,
flags
[
i
]);
ok
(
!
r
,
"failed to init mtx (flags %x)
\n
"
,
flags
[
i
]);
ok
(
!
r
,
"failed to init mtx (flags %x)
\n
"
,
flags
[
i
]);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx (flags %x)
\n
"
,
mtx
->
thread_id
,
flags
[
i
]);
ok
(
mtx
->
count
==
0
,
"mtx.count = %lu (flags %x)
\n
"
,
mtx
->
count
,
flags
[
i
]);
r
=
p__Mtx_trylock
(
&
mtx
);
r
=
p__Mtx_trylock
(
&
mtx
);
ok
(
!
r
,
"_Mtx_trylock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
!
r
,
"_Mtx_trylock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
mtx
->
thread_id
==
GetCurrentThreadId
(),
"mtx.thread_id = %lx (flags %x)
\n
"
,
mtx
->
thread_id
,
flags
[
i
]);
ok
(
mtx
->
count
==
1
,
"mtx.count = %lu (flags %x)
\n
"
,
mtx
->
count
,
flags
[
i
]);
r
=
p__Mtx_trylock
(
&
mtx
);
r
=
p__Mtx_trylock
(
&
mtx
);
ok
(
r
==
expect
,
"_Mtx_trylock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
r
==
expect
,
"_Mtx_trylock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
mtx
->
thread_id
==
GetCurrentThreadId
(),
"mtx.thread_id = %lx (flags %x)
\n
"
,
mtx
->
thread_id
,
flags
[
i
]);
ok
(
mtx
->
count
==
r
?
1
:
2
,
"mtx.count = %lu, expected %u (flags %x)
\n
"
,
mtx
->
count
,
r
?
1
:
2
,
flags
[
i
]);
if
(
!
r
)
p__Mtx_unlock
(
&
mtx
);
if
(
!
r
)
p__Mtx_unlock
(
&
mtx
);
r
=
p__Mtx_lock
(
&
mtx
);
r
=
p__Mtx_lock
(
&
mtx
);
ok
(
r
==
expect
,
"_Mtx_lock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
r
==
expect
,
"_Mtx_lock returned %x (flags %x)
\n
"
,
r
,
flags
[
i
]);
ok
(
mtx
->
thread_id
==
GetCurrentThreadId
(),
"mtx.thread_id = %lx (flags %x)
\n
"
,
mtx
->
thread_id
,
flags
[
i
]);
ok
(
mtx
->
count
==
r
?
1
:
2
,
"mtx.count = %lu, expected %u (flags %x)
\n
"
,
mtx
->
count
,
r
?
1
:
2
,
flags
[
i
]);
if
(
!
r
)
p__Mtx_unlock
(
&
mtx
);
if
(
!
r
)
p__Mtx_unlock
(
&
mtx
);
p__Mtx_unlock
(
&
mtx
);
p__Mtx_unlock
(
&
mtx
);
ok
(
mtx
->
thread_id
==
-
1
,
"mtx.thread_id = %lx (flags %x)
\n
"
,
mtx
->
thread_id
,
flags
[
i
]);
ok
(
mtx
->
count
==
0
,
"mtx.count = %lu (flags %x)
\n
"
,
mtx
->
count
,
flags
[
i
]);
p__Mtx_destroy
(
&
mtx
);
p__Mtx_destroy
(
&
mtx
);
}
}
}
}
...
...
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