From 6751f95eb648b42cdb55baa83efcb07a757ea9a7 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 16 Feb 2024 01:28:47 +0300 Subject: [PATCH] Adjust test cases and approximate equality --- osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs index 67e94a2960..02a0ae6e6c 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLoader.cs @@ -268,9 +268,9 @@ namespace osu.Game.Tests.Visual.Gameplay { addVolumeSteps("master and music volumes", () => { - audioManager.Volume.Value = 0.15; - audioManager.VolumeTrack.Value = 0.01; - }, () => audioManager.Volume.Value == 0.15 && audioManager.VolumeTrack.Value == 0.67); + audioManager.Volume.Value = 0.6; + audioManager.VolumeTrack.Value = 0.15; + }, () => Precision.AlmostEquals(audioManager.Volume.Value, 0.6) && Precision.AlmostEquals(audioManager.VolumeTrack.Value, 0.83)); } [Test] @@ -280,7 +280,7 @@ namespace osu.Game.Tests.Visual.Gameplay { audioManager.Volume.Value = 0.01; audioManager.VolumeTrack.Value = 0.15; - }, () => audioManager.Volume.Value == 0.1 && audioManager.VolumeTrack.Value == 1); + }, () => Precision.AlmostEquals(audioManager.Volume.Value, 0.5) && Precision.AlmostEquals(audioManager.VolumeTrack.Value, 1)); } [Test]