Module: wine Branch: master Commit: 18ea2e5f884e60c87bf49f264c1510ff677816d1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=18ea2e5f884e60c87bf49f264c...
Author: Sebastian Lackner sebastian@fds-team.de Date: Thu Mar 31 04:53:25 2016 +0200
ntdll/tests: Add test for threadpool environment version 3.
Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/tests/threadpool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c index 304fe91..1d8b1f9 100644 --- a/dlls/ntdll/tests/threadpool.c +++ b/dlls/ntdll/tests/threadpool.c @@ -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;