kernel32/tests: Test IsThreadAFiber function.

This commit is contained in:
André Hentschel 2010-01-24 16:30:36 +01:00 committed by Alexandre Julliard
parent f57dbecda8
commit e0475a3e11
1 changed files with 12 additions and 0 deletions

View File

@ -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)
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)
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)