ddraw/tests: Don't crash on older ddraw.
This commit is contained in:
parent
bfe67814f9
commit
72fab20ffe
|
@ -149,9 +149,14 @@ static void test_DirectDrawEnumerateA(void)
|
||||||
ret = pDirectDrawEnumerateA((LPDDENUMCALLBACKA)0xdeadbeef, NULL);
|
ret = pDirectDrawEnumerateA((LPDDENUMCALLBACKA)0xdeadbeef, NULL);
|
||||||
ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret);
|
ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret);
|
||||||
|
|
||||||
/* Test with callback that crashes. */
|
if (pDirectDrawEnumerateExA)
|
||||||
ret = pDirectDrawEnumerateA(crash_callbackA, NULL);
|
{
|
||||||
ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret);
|
/* Test with callback that crashes. */
|
||||||
|
ret = pDirectDrawEnumerateA(crash_callbackA, NULL);
|
||||||
|
ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
win_skip("Test would crash on older ddraw\n");
|
||||||
|
|
||||||
/* Test with valid callback parameter and NULL context parameter. */
|
/* Test with valid callback parameter and NULL context parameter. */
|
||||||
trace("Calling DirectDrawEnumerateA with test_nullcontext_callbackA callback and NULL context.\n");
|
trace("Calling DirectDrawEnumerateA with test_nullcontext_callbackA callback and NULL context.\n");
|
||||||
|
@ -185,7 +190,9 @@ static void test_DirectDrawEnumerateW(void)
|
||||||
|
|
||||||
/* Test with NULL callback parameter. */
|
/* Test with NULL callback parameter. */
|
||||||
ret = pDirectDrawEnumerateW(NULL, NULL);
|
ret = pDirectDrawEnumerateW(NULL, NULL);
|
||||||
ok(ret == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %d\n", ret);
|
ok(ret == DDERR_INVALIDPARAMS ||
|
||||||
|
ret == DDERR_UNSUPPORTED, /* Older ddraw */
|
||||||
|
"Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d\n", ret);
|
||||||
|
|
||||||
/* Test with invalid callback parameter. */
|
/* Test with invalid callback parameter. */
|
||||||
ret = pDirectDrawEnumerateW((LPDDENUMCALLBACKW)0xdeadbeef, NULL);
|
ret = pDirectDrawEnumerateW((LPDDENUMCALLBACKW)0xdeadbeef, NULL);
|
||||||
|
|
Loading…
Reference in New Issue