Skip to content

Commit

Permalink
Add a test 'TestChannelLifetime'
Browse files Browse the repository at this point in the history
  • Loading branch information
hwsmm committed Oct 24, 2024
1 parent 934b935 commit cc00d81
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions osu.Framework.Tests/Audio/SampleBassTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,17 @@ public void TestPlayingUpdatedAfterInlineStop()
bass.RunOnAudioThread(() => channel.Stop());
Assert.That(channel.Playing, Is.False);
}

[Test]
public void TestChannelLifetime()
{
channel = sample.Play();
bass.Update();

bass.RunOnAudioThread(() => channel.Stop());
bass.Update();

Assert.That(channel.IsDisposed, Is.True);
}
}
}

0 comments on commit cc00d81

Please sign in to comment.