Commit e0475a3e authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

kernel32/tests: Test IsThreadAFiber function.

parent f57dbecd
...@@ -27,6 +27,7 @@ static void (WINAPI *pSwitchToFiber)(LPVOID); ...@@ -27,6 +27,7 @@ static void (WINAPI *pSwitchToFiber)(LPVOID);
static void (WINAPI *pDeleteFiber)(LPVOID); static void (WINAPI *pDeleteFiber)(LPVOID);
static LPVOID (WINAPI *pConvertThreadToFiberEx)(LPVOID,DWORD); static LPVOID (WINAPI *pConvertThreadToFiberEx)(LPVOID,DWORD);
static LPVOID (WINAPI *pCreateFiberEx)(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID); static LPVOID (WINAPI *pCreateFiberEx)(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID);
static BOOL (WINAPI *pIsThreadAFiber)(void);
static LPVOID fibers[2]; static LPVOID fibers[2];
static BYTE testparam = 185; static BYTE testparam = 185;
...@@ -43,6 +44,7 @@ static VOID init_funcs(void) ...@@ -43,6 +44,7 @@ static VOID init_funcs(void)
X(DeleteFiber); X(DeleteFiber);
X(ConvertThreadToFiberEx); X(ConvertThreadToFiberEx);
X(CreateFiberEx); X(CreateFiberEx);
X(IsThreadAFiber);
#undef X #undef X
} }
...@@ -122,6 +124,16 @@ static void test_FiberHandling(void) ...@@ -122,6 +124,16 @@ static void test_FiberHandling(void)
pSwitchToFiber(fibers[1]); pSwitchToFiber(fibers[1]);
pDeleteFiber(fibers[1]); pDeleteFiber(fibers[1]);
if (!pIsThreadAFiber)
{
skip( "IsThreadAFiber not present\n" );
return;
}
ok(pIsThreadAFiber(), "IsThreadAFiber reported FALSE\n");
test_ConvertFiberToThread();
ok(!pIsThreadAFiber(), "IsThreadAFiber reported TRUE\n");
} }
START_TEST(fiber) START_TEST(fiber)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment