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
84663627
Commit
84663627
authored
Aug 25, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120/tests: Add Context::IsCurrentTaskCollectionCanceling tests.
parent
5c574f68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+12
-0
No files found.
dlls/msvcr120/tests/msvcr120.c
View file @
84663627
...
...
@@ -251,6 +251,7 @@ static void (__thiscall *p__Condition_variable_notify_all)(_Condition_variable*)
static
Context
*
(
__cdecl
*
p_Context_CurrentContext
)(
void
);
static
_Context
*
(
__cdecl
*
p__Context__CurrentContext
)(
_Context
*
);
static
MSVCRT_bool
(
__cdecl
*
p_Context_IsCurrentTaskCollectionCanceling
)(
void
);
static
_StructuredTaskCollection
*
(
__thiscall
*
p__StructuredTaskCollection_ctor
)(
_StructuredTaskCollection
*
,
void
*
);
static
void
(
__thiscall
*
p__StructuredTaskCollection_dtor
)(
_StructuredTaskCollection
*
);
...
...
@@ -317,6 +318,7 @@ static BOOL init(void)
SET
(
p__Context__CurrentContext
,
"?_CurrentContext@_Context@details@Concurrency@@SA?AV123@XZ"
);
SET
(
p_strcmp
,
"strcmp"
);
SET
(
p_strncmp
,
"strncmp"
);
SET
(
p_Context_IsCurrentTaskCollectionCanceling
,
"?IsCurrentTaskCollectionCanceling@Context@Concurrency@@SA_NXZ"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p__StructuredTaskCollection_ctor
,
"??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z"
);
...
...
@@ -1409,6 +1411,9 @@ static void __cdecl chore_proc(_UnrealizedChore *_this)
chore
->
chore
.
task_collection
);
ok
(
!
canceling
,
"Task is already canceling
\n
"
);
ok
(
!
p_Context_IsCurrentTaskCollectionCanceling
(),
"IsCurrentTaskCollectionCanceling returned TRUE
\n
"
);
call_func1
(
p__Cancellation_beacon_ctor
,
&
beacon
);
ok
(
!*
beacon
.
cancelling
,
"beacon signalled %x
\n
"
,
*
beacon
.
cancelling
);
...
...
@@ -1440,6 +1445,9 @@ static void __cdecl chore_proc(_UnrealizedChore *_this)
chore
->
chore
.
task_collection
);
ok
(
canceling
,
"Task is not canceling
\n
"
);
ok
(
p_Context_IsCurrentTaskCollectionCanceling
(),
"IsCurrentTaskCollectionCanceling returned FALSE
\n
"
);
ok
(
*
beacon
.
cancelling
==
1
,
"beacon not signalled (%x)
\n
"
,
*
beacon
.
cancelling
);
call_func1
(
p__Cancellation_beacon_dtor
,
&
beacon
);
ok
(
*
beacon2
.
cancelling
==
1
,
"beacon not signalled (%x)
\n
"
,
*
beacon2
.
cancelling
);
...
...
@@ -1622,10 +1630,14 @@ static void test_StructuredTaskCollection(void)
ret
=
WaitForSingleObject
(
chore_evt1
,
5000
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %ld
\n
"
,
ret
);
ok
(
!
p_Context_IsCurrentTaskCollectionCanceling
(),
"IsCurrentTaskCollectionCanceling returned TRUE
\n
"
);
call_func1
(
p__Cancellation_beacon_ctor
,
&
beacon
);
ok
(
!*
beacon
.
cancelling
,
"beacon signalled
\n
"
);
call_func1
(
p__StructuredTaskCollection__Cancel
,
&
task_coll
);
ok
(
!
p_Context_IsCurrentTaskCollectionCanceling
(),
"IsCurrentTaskCollectionCanceling returned TRUE
\n
"
);
ok
(
!*
beacon
.
cancelling
,
"beacon signalled
\n
"
);
b
=
SetEvent
(
chore_evt2
);
...
...
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