[PATCH 2/2] wininet/tests: Added checks for bad return values and skip tests when it happens. (try 2)

Alexandre Julliard julliard at winehq.org
Mon Apr 9 11:22:04 CDT 2012


Morten Rønne <morten.roenne at tdcadsl.dk> writes:

> diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c
> index 02d8d28..1bf3f23 100644
> --- a/dlls/wininet/tests/urlcache.c
> +++ b/dlls/wininet/tests/urlcache.c
> @@ -60,7 +60,20 @@ static void test_find_url_cache_entriesA(void)
>      hEnumHandle = FindFirstUrlCacheEntry(NULL, NULL, &cbCacheEntryInfo);
>      ok(!hEnumHandle, "FindFirstUrlCacheEntry should have failed\n");
>      ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "FindFirstUrlCacheEntry should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d\n", GetLastError());
> +    if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
> +    {
> +        skip("Find*UrlCacheEntry tests skipped, due to wrong return value\n");
> +        return;
> +    }

You don't need to add skip() for that sort of thing, it's not supposed
to happen, and if it does there will already be a test failure in the
report.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list