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
ffae80a3
Commit
ffae80a3
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: Run fiber tests on more platforms.
parent
64f2c034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
fiber.c
dlls/kernel32/tests/fiber.c
+25
-11
No files found.
dlls/kernel32/tests/fiber.c
View file @
ffae80a3
...
...
@@ -27,39 +27,51 @@ static void (WINAPI *pSwitchToFiber)(LPVOID);
static
void
(
WINAPI
*
pDeleteFiber
)(
LPVOID
);
static
LPVOID
fibers
[
2
];
static
BYTE
testparam
=
18
7
;
static
BYTE
testparam
=
18
5
;
static
BOOL
init_funcs
(
void
)
static
VOID
init_funcs
(
void
)
{
HMODULE
hKernel32
=
GetModuleHandle
(
"kernel32"
);
#define X(f)
if (!(p##f = (void*)GetProcAddress(hKernel32, #f))) return FALSE
;
#define X(f)
p##f = (void*)GetProcAddress(hKernel32, #f)
;
X
(
CreateFiber
);
X
(
ConvertThreadToFiber
);
X
(
ConvertFiberToThread
);
X
(
SwitchToFiber
);
X
(
DeleteFiber
);
#undef X
return
TRUE
;
}
static
VOID
WINAPI
FiberMainProc
(
LPVOID
lpFiberParameter
)
{
BYTE
*
tparam
=
(
BYTE
*
)
lpFiberParameter
;
ok
(
*
tparam
==
18
7
,
"Parameterdata expected not to be changed
\n
"
);
ok
(
*
tparam
==
18
5
,
"Parameterdata expected not to be changed
\n
"
);
pSwitchToFiber
(
fibers
[
0
]);
}
static
void
test_ConvertThreadToFiber
(
void
)
{
fibers
[
0
]
=
pConvertThreadToFiber
(
&
testparam
);
ok
(
fibers
[
0
]
!=
0
,
"ConvertThreadToFiber failed with error %d
\n
"
,
GetLastError
());
if
(
pConvertThreadToFiber
)
{
fibers
[
0
]
=
pConvertThreadToFiber
(
&
testparam
);
ok
(
fibers
[
0
]
!=
0
,
"ConvertThreadToFiber failed with error %d
\n
"
,
GetLastError
());
}
else
{
win_skip
(
"ConvertThreadToFiber not present
\n
"
);
}
}
static
void
test_ConvertFiberToThread
(
void
)
{
ok
(
pConvertFiberToThread
()
,
"ConvertThreadToFiber failed with error %d
\n
"
,
GetLastError
());
if
(
pConvertFiberToThread
)
{
ok
(
pConvertFiberToThread
()
,
"ConvertFiberToThread failed with error %d
\n
"
,
GetLastError
());
}
else
{
win_skip
(
"ConvertFiberToThread not present
\n
"
);
}
}
static
void
test_CreateFiber
(
void
)
...
...
@@ -73,9 +85,11 @@ static void test_CreateFiber(void)
START_TEST
(
fiber
)
{
if
(
!
init_funcs
())
init_funcs
();
if
(
!
pCreateFiber
)
{
win_skip
(
"Needed functions are not available
\n
"
);
win_skip
(
"Fibers not supported by win95
\n
"
);
return
;
}
...
...
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