On 08/12/2010 12:09 AM, Austin Lund wrote:
On 12 August 2010 15:48, Vitaliy Margolen<wine-de...@kievinfo.com>  wrote:
You can't test that. All you can test is that you got the IDirectMusicPort
back or not. What exactly inside is irrelevant.

And if IDirectMusicPerformance8_PChannelInfo succeeds and you getting not
null pDirectMusicPort back but it points to bogus data or is unchanged (as
it is now), it's outright invalid behavior that should be fixed. No tests
needed for that.

OK.  How about this:

static void test_PChannelInfo(void)
{
     IDirectMusicPort *pDirectMusicPort;
     HRESULT hr;

     pDirectMusicPort = NULL;
     hr = IDirectMusicPerformance8_PChannelInfo(idmusicperformance, 0,
&pDirectMusicPort, NULL, NULL);
     ok(hr == S_OK, "Failed to call PChannelInfo (%x)\n", hr);
     todo_wine ok(pDirectMusicPort != NULL, "IDirectMusicPort not set\n");
}
This looks much better.

I'll take on other comments and resubmit tomorrow as suggested.

+static void test_GetDefaultAudioPath(void)
+{
+    hr = 
IDirectMusicPerformance8_GetDefaultAudioPath(idmusicperformance,&pDirectMusicAudioPath);
You leaking pDirectMusicAudioPath here. You should free it after test.

Same for idmusicperformance. And CoInitialize() needs a matching CoUninitialize().

Vitaliy.


Reply via email to