From 5c2cff30aa1bb448f8bdd77ff3b2795be386fac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Sat, 20 Feb 2016 10:40:45 +0100 Subject: [PATCH] setupapi/tests: Use todo_wine_if() in tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Delanoy Signed-off-by: Alexandre Julliard --- dlls/setupapi/tests/parser.c | 9 +-------- dlls/setupapi/tests/setupcab.c | 22 ++-------------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index c2d554a6616..f929f0196f0 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -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 ); diff --git a/dlls/setupapi/tests/setupcab.c b/dlls/setupapi/tests/setupcab.c index 6c76321b435..33daae922b6 100644 --- a/dlls/setupapi/tests/setupcab.c +++ b/dlls/setupapi/tests/setupcab.c @@ -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 + 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()); - } - else - { - 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 + 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()); - } - else - { - 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);