Kai Blin : dplayx: Use skip and fix indentation.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 5 06:23:19 CST 2007
Module: wine
Branch: master
Commit: 2a13eb0677957ebb2f36cc048f67956cf715d236
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a13eb0677957ebb2f36cc048f67956cf715d236
Author: Kai Blin <kai.blin at gmail.com>
Date: Sat Mar 3 12:43:51 2007 +0100
dplayx: Use skip and fix indentation.
---
dlls/dplayx/tests/dplayx.c | 45 ++++++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c
index 6568f13..836171e 100644
--- a/dlls/dplayx/tests/dplayx.c
+++ b/dlls/dplayx/tests/dplayx.c
@@ -51,29 +51,34 @@ static void test_session_guid(LPDIRECTPLAY4 pDP)
CoCreateGuid( &appGuid );
IDirectPlayX_EnumConnections(pDP, &appGuid, EnumConnectionsCallback, pDP, 0);
- if( validSP )
- {
- memset(&sessionDesc, 0, sizeof( DPSESSIONDESC2 ));
- memset(&zeroGuid, 0, 16);
- sessionDesc.dwSize = sizeof( DPSESSIONDESC2 );
- memcpy(&sessionDesc.guidApplication, &appGuid, 16);
- sessionDesc.dwFlags = DPSESSION_CLIENTSERVER;
- sessionDesc.lpszSessionNameA = name;
- sessionDesc.dwMaxPlayers = 10;
- sessionDesc.dwCurrentPlayers = 0;
- IDirectPlayX_Open(pDP, &sessionDesc, DPOPEN_CREATE);
- /* I read the sessiondesc from directplay in a fresh memory location,
- because directplay does not touch the original struct, but saves
- internally a version with the session guid set*/
- IDirectPlayX_GetSessionDesc(pDP, NULL, &sessionSize);
- newSession=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sessionSize);
- IDirectPlayX_GetSessionDesc(pDP, newSession, &sessionSize);
- todo_wine ok( !IsEqualGUID(&newSession->guidInstance, &zeroGuid), "Session guid not initialized");
- HeapFree(GetProcessHeap(), 0, newSession);
+ if( !validSP )
+ {
+ skip("Tests will not work without a valid service provider, skipping.\n");
+ return;
}
-}
+ memset(&sessionDesc, 0, sizeof( DPSESSIONDESC2 ));
+ memset(&zeroGuid, 0, 16);
+
+ sessionDesc.dwSize = sizeof( DPSESSIONDESC2 );
+ memcpy(&sessionDesc.guidApplication, &appGuid, 16);
+ sessionDesc.dwFlags = DPSESSION_CLIENTSERVER;
+ sessionDesc.lpszSessionNameA = name;
+ sessionDesc.dwMaxPlayers = 10;
+ sessionDesc.dwCurrentPlayers = 0;
+ IDirectPlayX_Open(pDP, &sessionDesc, DPOPEN_CREATE);
+
+ /* I read the sessiondesc from directplay in a fresh memory location,
+ because directplay does not touch the original struct, but saves
+ internally a version with the session guid set*/
+
+ IDirectPlayX_GetSessionDesc(pDP, NULL, &sessionSize);
+ newSession = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sessionSize);
+ IDirectPlayX_GetSessionDesc(pDP, newSession, &sessionSize);
+ todo_wine ok( !IsEqualGUID(&newSession->guidInstance, &zeroGuid), "Session guid not initialized");
+ HeapFree(GetProcessHeap(), 0, newSession);
+}
START_TEST(dplayx)
{
More information about the wine-cvs
mailing list