From a812ed4462a5126ff9ba2eb2d858814e59a2ddee Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 2 Mar 2022 23:40:14 +0300 Subject: [PATCH] Ensure there is at least one sample during rate assertion --- .../Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs index 7a74a00c68..44529aa78c 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs @@ -83,9 +83,7 @@ namespace osu.Game.Tests.Visual.Gameplay createPlayerTest(true); AddAssert("sample playback rate matches mod rates", () => allStoryboardSamples.All(sound => - { - return sound.ChildrenOfType().All(s => s.AggregateFrequency.Value == expectedRate); - })); + sound.ChildrenOfType().First().AggregateFrequency.Value == expectedRate)); } [TestCase(typeof(ModWindUp), 0.5, 2)] @@ -113,9 +111,7 @@ namespace osu.Game.Tests.Visual.Gameplay }); AddAssert("sample playback rate matches mod rates", () => allStoryboardSamples.All(sound => - { - return sound.ChildrenOfType().All(s => s.AggregateFrequency.Value == gameplayMod.SpeedChange.Value); - })); + sound.ChildrenOfType().First().AggregateFrequency.Value == gameplayMod.SpeedChange.Value)); } private void createPlayerTest(bool skipIntro = false)