Module: wine Branch: master Commit: cbf48daecf8a07d2553914805b4e02f9e18c2930 URL: https://gitlab.winehq.org/wine/wine/-/commit/cbf48daecf8a07d2553914805b4e02f...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Dec 15 12:11:51 2023 +0100
dmime/tests: Allow small time variation in test_segment_state.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55637
---
dlls/dmime/tests/dmime.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 8f79511bf96..9ec6248f9d1 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -4503,17 +4503,20 @@ static void test_segment_state(void)
tmp_state = (void *)0xdeadbeef; hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 0); - ok(hr == S_OK, "got %#lx\n", hr); - ok(state == tmp_state, "got %p\n", state); - IDirectMusicSegmentState_Release(tmp_state); + ok(hr == S_OK || broken(hr == DMUS_E_NOT_FOUND) /* sometimes on Windows */, "got %#lx\n", hr); + if (hr == S_OK) + { + ok(state == tmp_state, "got %p\n", tmp_state); + IDirectMusicSegmentState_Release(tmp_state); + }
tmp_state = (void *)0xdeadbeef; hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 69); ok(hr == S_OK, "got %#lx\n", hr); - ok(state == tmp_state, "got %p\n", state); + ok(state == tmp_state, "got %p\n", tmp_state); IDirectMusicSegmentState_Release(tmp_state);
- hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 70); + hr = IDirectMusicPerformance_GetSegmentState(performance, &tmp_state, 71); todo_wine ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);