Skip to content

Commit

Permalink
Convert TestTogglePlaying to use ManualFree
Browse files Browse the repository at this point in the history
  • Loading branch information
hwsmm committed Nov 29, 2024
1 parent e4af349 commit 3d09ec5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions osu.Framework.Tests/Visual/Audio/TestSceneSampleChannels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,20 @@ public void TestPlayLoopingSample()
}

[Test]
public void TestTogglePlaying()
public void TestTogglePlayingManualFree()
{
SampleChannel channel = null;
AddStep("play sample", () => channel = sample.Play());
AddStep("play sample", () =>
{
channel = sample.GetChannel();
channel.ManualFree = true;
channel.Play();
});

AddStep("stop channel", () => channel.Stop());
AddStep("start channel", () => channel.Play());
AddAssert("still playing", () => channel.Playing);
AddStep("dispose channel", () => channel.Dispose());
}

[Test]
Expand Down

0 comments on commit 3d09ec5

Please sign in to comment.