Commit 617d7fc9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmime/tests: Test IDirectMusicPerformance_GetSegmentState.

parent d9636260
......@@ -4053,6 +4053,12 @@ static void test_segment_state(void)
check_track_state(track, initialized, FALSE);
check_track_state(track, playing, FALSE);
hr = IDirectMusicPerformance_GetSegmentState(performance, NULL, 0);
todo_wine ok(hr == E_POINTER, "got %#lx\n", hr);
hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 0);
todo_wine ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);
tmp_state = state;
state = (void *)0xdeadbeef;
hr = IDirectMusicPerformance_PlaySegment(performance, segment, 0, 20, &state);
......@@ -4062,6 +4068,22 @@ static void test_segment_state(void)
ok(state != tmp_state, "got %p\n", state);
IDirectMusicSegmentState_Release(tmp_state);
tmp_state = (void *)0xdeadbeef;
hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 0);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(state == tmp_state, "got %p\n", state);
if (tmp_state != (void *)0xdeadbeef) IDirectMusicSegmentState_Release(tmp_state);
tmp_state = (void *)0xdeadbeef;
hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 69);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(state == tmp_state, "got %p\n", state);
if (tmp_state != (void *)0xdeadbeef) IDirectMusicSegmentState_Release(tmp_state);
hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 70);
todo_wine ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);
check_track_state(track, downloaded, FALSE);
check_track_state(track, initialized, TRUE);
......@@ -4074,6 +4096,9 @@ static void test_segment_state(void)
ret = test_track_wait_playing(track, 50);
ok(ret == 0, "got %#lx\n", ret);
hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 0);
todo_wine ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);
tmp_segment = (void *)0xdeadbeef;
hr = IDirectMusicSegmentState_GetSegment(state, &tmp_segment);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment