ddraw/tests: Validate the "surface" pointer is unmodified after CreateSurface() without cooperative level.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-02-16 15:12:14 +01:00 committed by Alexandre Julliard
parent c2a4e620ee
commit 438d0fed86
4 changed files with 8 additions and 0 deletions

View File

@ -3296,8 +3296,10 @@ static void test_coop_level_surf_create(void)
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
surface = (void *)0xdeadbeef;
hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL);
ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr);
ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw_Release(ddraw);
}

View File

@ -3517,8 +3517,10 @@ static void test_coop_level_surf_create(void)
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
surface = (void *)0xdeadbeef;
hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL);
ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr);
ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw2_Release(ddraw);
}

View File

@ -3647,8 +3647,10 @@ static void test_coop_level_surf_create(void)
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
surface = (void *)0xdeadbeef;
hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL);
ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr);
ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw4_Release(ddraw);
}

View File

@ -3373,8 +3373,10 @@ static void test_coop_level_surf_create(void)
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
surface = (void *)0xdeadbeef;
hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL);
ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr);
ok(surface == (void *)0xdeadbeef, "Got unexpected surface %p.\n", surface);
IDirectDraw7_Release(ddraw);
}