Commit 18ea2e5f authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

ntdll/tests: Add test for threadpool environment version 3.

parent eb5f4b86
......@@ -477,6 +477,7 @@ static void CALLBACK simple2_cb(TP_CALLBACK_INSTANCE *instance, void *userdata)
static void test_tp_simple(void)
{
TP_CALLBACK_ENVIRON environment;
TP_CALLBACK_ENVIRON_V3 environment3;
TP_CLEANUP_GROUP *group;
HANDLE semaphore;
NTSTATUS status;
......@@ -512,6 +513,17 @@ static void test_tp_simple(void)
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
/* test with environment version 3 */
memset(&environment3, 0, sizeof(environment3));
environment3.Version = 3;
environment3.Pool = pool;
environment3.CallbackPriority = TP_CALLBACK_PRIORITY_NORMAL;
environment3.Size = sizeof(environment3);
status = pTpSimpleTryPost(simple_cb, semaphore, (TP_CALLBACK_ENVIRON *)&environment3);
ok(!status, "TpSimpleTryPost failed with status %x\n", status);
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
/* test with invalid version number */
memset(&environment, 0, sizeof(environment));
environment.Version = 9999;
......
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