[PATCH] ddraw/tests: Move CreateSurface() invalid arguments test
Henri Verbeet
hverbeet at gmail.com
Thu Jan 11 07:33:37 CST 2018
.On 11 January 2018 at 14:23, Nikolay Sivov <nsivov at codeweavers.com> wrote:
> @@ -2012,6 +2012,21 @@ static void test_surface_qi(void)
> IDirectDrawSurface_Release(surface);
> IDirectDraw_Release(ddraw);
> DestroyWindow(window);
> +
> + /* Invalid arguments. */
> + ddraw = create_ddraw();
> + ok(!!ddraw, "Failed to create a ddraw object.\n");
> +
> + hr = IDirectDraw_CreateSurface(ddraw, NULL, &surface, NULL);
> + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Unexpected hr %#x.\n", hr);
> +
> + hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL);
> + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
> +
> + hr = IDirectDraw_CreateSurface(ddraw, NULL, &surface, NULL);
> + ok(hr == DDERR_INVALIDPARAMS, "Unexpected hr %#x.\n", hr);
> +
> + IDirectDraw_Release(ddraw);
> }
It's probably best to put this in test_coop_level_surf_create().
More information about the wine-devel
mailing list