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
f57dbecd
Commit
f57dbecd
authored
Jan 24, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Jan 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Test fiber Ex functions.
parent
ffae80a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
5 deletions
+43
-5
fiber.c
dlls/kernel32/tests/fiber.c
+43
-5
No files found.
dlls/kernel32/tests/fiber.c
View file @
f57dbecd
...
...
@@ -25,6 +25,8 @@ static LPVOID (WINAPI *pConvertThreadToFiber)(LPVOID);
static
BOOL
(
WINAPI
*
pConvertFiberToThread
)(
void
);
static
void
(
WINAPI
*
pSwitchToFiber
)(
LPVOID
);
static
void
(
WINAPI
*
pDeleteFiber
)(
LPVOID
);
static
LPVOID
(
WINAPI
*
pConvertThreadToFiberEx
)(
LPVOID
,
DWORD
);
static
LPVOID
(
WINAPI
*
pCreateFiberEx
)(
SIZE_T
,
SIZE_T
,
DWORD
,
LPFIBER_START_ROUTINE
,
LPVOID
);
static
LPVOID
fibers
[
2
];
static
BYTE
testparam
=
185
;
...
...
@@ -39,6 +41,8 @@ static VOID init_funcs(void)
X
(
ConvertFiberToThread
);
X
(
SwitchToFiber
);
X
(
DeleteFiber
);
X
(
ConvertThreadToFiberEx
);
X
(
CreateFiberEx
);
#undef X
}
...
...
@@ -62,6 +66,19 @@ static void test_ConvertThreadToFiber(void)
}
}
static
void
test_ConvertThreadToFiberEx
(
void
)
{
if
(
pConvertThreadToFiberEx
)
{
fibers
[
0
]
=
pConvertThreadToFiberEx
(
&
testparam
,
0
);
ok
(
fibers
[
0
]
!=
0
,
"ConvertThreadToFiberEx failed with error %d
\n
"
,
GetLastError
());
}
else
{
win_skip
(
"ConvertThreadToFiberEx not present
\n
"
);
}
}
static
void
test_ConvertFiberToThread
(
void
)
{
if
(
pConvertFiberToThread
)
...
...
@@ -74,13 +91,37 @@ static void test_ConvertFiberToThread(void)
}
}
static
void
test_
CreateFiber
(
void
)
static
void
test_
FiberHandling
(
void
)
{
fibers
[
0
]
=
pCreateFiber
(
0
,
FiberMainProc
,
&
testparam
);
ok
(
fibers
[
0
]
!=
0
,
"CreateFiber failed with error %d
\n
"
,
GetLastError
());
pDeleteFiber
(
fibers
[
0
]);
test_ConvertThreadToFiber
();
test_ConvertFiberToThread
();
if
(
pConvertThreadToFiberEx
)
test_ConvertThreadToFiberEx
();
else
test_ConvertThreadToFiber
();
fibers
[
1
]
=
pCreateFiber
(
0
,
FiberMainProc
,
&
testparam
);
ok
(
fibers
[
1
]
!=
0
,
"CreateFiber failed with error %d
\n
"
,
GetLastError
());
pSwitchToFiber
(
fibers
[
1
]);
pDeleteFiber
(
fibers
[
1
]);
if
(
!
pCreateFiberEx
)
{
win_skip
(
"CreateFiberEx not present
\n
"
);
return
;
}
fibers
[
1
]
=
pCreateFiberEx
(
0
,
0
,
0
,
FiberMainProc
,
&
testparam
);
ok
(
fibers
[
1
]
!=
0
,
"CreateFiberEx failed with error %d
\n
"
,
GetLastError
());
pSwitchToFiber
(
fibers
[
1
]);
pDeleteFiber
(
fibers
[
1
]);
}
START_TEST
(
fiber
)
...
...
@@ -93,8 +134,5 @@ START_TEST(fiber)
return
;
}
test_ConvertThreadToFiber
();
test_ConvertFiberToThread
();
test_ConvertThreadToFiber
();
test_CreateFiber
();
test_FiberHandling
();
}
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