wininet: tests/http.c: Improve HttpOpenRequest test

Alexandre Julliard julliard at winehq.org
Wed Jul 9 03:46:55 CDT 2008


Zac Brown <zac at zacbrown.org> writes:

> +    SetLastError(0xdeadbeef);
>      ret = HttpSendRequest(request, NULL, 0, NULL, 0);
>      ok(ret, "HttpSendRequest failed: %u\n", GetLastError());
> +    ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
> +       GetLastError() == ERROR_SUCCESS,
> +       "HttpSendRequest failed, got %u.\n", GetLastError());
>      ok(InternetCloseHandle(request), "Close request handle failed\n");

Testing last error on success is not useful, unless it's explicitly
specified that last error is set, or there is an app that depends on it.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list