1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

schedsvc/tests: Use a winetest context in the rpcapi loops.

This commit is contained in:
Francois Gouget 2023-03-25 18:05:06 +01:00 committed by Alexandre Julliard
parent 3e975e9360
commit ee2c7dc881

View file

@ -155,6 +155,7 @@ START_TEST(rpcapi)
for (i = 0; i < ARRAY_SIZE(create_new_task); i++)
{
winetest_push_context("%lu", i);
path = NULL;
info = NULL;
hr = SchRpcRegisterTask(L"\\Wine\\Task1", xml1, create_new_task[i].flags, NULL,
@ -168,6 +169,7 @@ START_TEST(rpcapi)
ok(!info, "expected NULL, info %p\n", info);
MIDL_user_free(path);
}
winetest_pop_context();
}
path = NULL;
@ -195,11 +197,12 @@ START_TEST(rpcapi)
for (i = 0; i < ARRAY_SIZE(open_existing_task); i++)
{
winetest_push_context("%lu", i);
path = NULL;
info = NULL;
hr = SchRpcRegisterTask(L"Wine\\Folder1\\Task1", xml1, open_existing_task[i].flags, NULL,
TASK_LOGON_NONE, 0, NULL, &path, &info);
ok(hr == open_existing_task[i].hr, "%lu: expected %#lx, got %#lx\n", i, open_existing_task[i].hr, hr);
ok(hr == open_existing_task[i].hr, "expected %#lx, got %#lx\n", open_existing_task[i].hr, hr);
if (hr == S_OK)
{
ok(!lstrcmpW(path, L"\\Wine\\Folder1\\Task1") /* win7 */ ||
@ -208,8 +211,9 @@ START_TEST(rpcapi)
MIDL_user_free(path);
}
else
ok(!path, "%lu: expected NULL, path %p\n", i, path);
ok(!info, "%lu: expected NULL, info %p\n", i, info);
ok(!path, "expected NULL, path %p\n", path);
ok(!info, "expected NULL, info %p\n", info);
winetest_pop_context();
}
path = NULL;