Commit 5c2cff30 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

setupapi/tests: Use todo_wine_if() in tests.

parent a8a6f0bd
......@@ -152,14 +152,7 @@ static void test_invalid_files(void)
if (invalid_files[i].error) /* should fail */
{
ok( hinf == INVALID_HANDLE_VALUE, "file %u: Open succeeded\n", i );
if (invalid_files[i].todo) todo_wine
{
ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n",
i, err, invalid_files[i].error );
ok( err_line == invalid_files[i].err_line, "file %u: Bad error line %d/%d\n",
i, err_line, invalid_files[i].err_line );
}
else
todo_wine_if (invalid_files[i].todo)
{
ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n",
i, err, invalid_files[i].error );
......
......@@ -115,19 +115,10 @@ static void test_invalid_parametersA(void)
ret = SetupIterateCabinetA(invalid_parameters[i].CabinetFile, 0,
invalid_parameters[i].MsgHandler, NULL);
ok(!ret, "[%d] Expected SetupIterateCabinetA to return 0, got %d\n", i, ret);
if (invalid_parameters[i].todo_lasterror)
{
todo_wine
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
else
{
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
}
SetLastError(0xdeadbeef);
......@@ -190,19 +181,10 @@ static void test_invalid_parametersW(void)
ret = SetupIterateCabinetW(invalid_parameters[i].CabinetFile, 0,
invalid_parameters[i].MsgHandler, NULL);
ok(!ret, "[%d] Expected SetupIterateCabinetW to return 0, got %d\n", i, ret);
if (invalid_parameters[i].todo_lasterror)
{
todo_wine
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
else
{
todo_wine_if (invalid_parameters[i].todo_lasterror)
ok(GetLastError() == invalid_parameters[i].expected_lasterror,
"[%d] Expected GetLastError() to return %u, got %u\n",
i, invalid_parameters[i].expected_lasterror, GetLastError());
}
}
SetLastError(0xdeadbeef);
......
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