From d417b156b25b9541ae88d1acc1d93aa571abbaf0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Dec 2023 19:57:42 +0900 Subject: [PATCH] Update test expectations --- .../Mods/TestSceneManiaModDoubleTime.cs | 7 ++++--- osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs | 6 +++--- osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModDoubleTime.cs b/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModDoubleTime.cs index c717f03f51..975e43ec08 100644 --- a/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModDoubleTime.cs +++ b/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModDoubleTime.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using NUnit.Framework; +using osu.Framework.Utils; using osu.Game.Beatmaps; using osu.Game.Rulesets.Mania.Mods; using osu.Game.Rulesets.Mania.Objects; @@ -25,8 +26,8 @@ public partial class TestSceneManiaModDoubleTime : ModTestScene public void TestHitWindowWithoutDoubleTime() => CreateModTest(new ModTestData { PassCondition = () => Player.ScoreProcessor.JudgedHits > 0 - && Player.ScoreProcessor.Accuracy.Value == 1 - && Player.ScoreProcessor.TotalScore.Value == 1_000_000, + && Precision.AlmostEquals(Player.ScoreProcessor.Accuracy.Value, 0.9836, 0.01) + && Player.ScoreProcessor.TotalScore.Value == 946_049, Autoplay = false, Beatmap = new Beatmap { @@ -53,7 +54,7 @@ public void TestHitWindowWithDoubleTime() Mod = doubleTime, PassCondition = () => Player.ScoreProcessor.JudgedHits > 0 && Player.ScoreProcessor.Accuracy.Value == 1 - && Player.ScoreProcessor.TotalScore.Value == (long)(1_000_010 * doubleTime.ScoreMultiplier), + && Player.ScoreProcessor.TotalScore.Value == (long)(1_000_000 * doubleTime.ScoreMultiplier), Autoplay = false, Beatmap = new Beatmap { diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs index 044ce37832..d752c443cc 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs @@ -201,11 +201,11 @@ public void TestPressAtStartThenReleaseAndImmediatelyRepress() assertHeadJudgement(HitResult.Perfect); // judgement combo offset by perfect bonus judgement. see logic in DrawableNote.CheckForResult. - assertComboAtJudgement(1, 1); + assertComboAtJudgement(0, 1); assertTailJudgement(HitResult.Meh); - assertComboAtJudgement(2, 0); + assertComboAtJudgement(1, 0); // judgement combo offset by perfect bonus judgement. see logic in DrawableNote.CheckForResult. - assertComboAtJudgement(4, 1); + assertComboAtJudgement(3, 1); } /// diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs index edf866952b..ee6d999932 100644 --- a/osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs +++ b/osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs @@ -54,7 +54,7 @@ public void TestSimultaneousTickAndNote() AddAssert("all objects perfectly judged", () => judgementResults.Select(result => result.Type), () => Is.EquivalentTo(judgementResults.Select(result => result.Judgement.MaxResult))); - AddAssert("score is correct", () => currentPlayer.ScoreProcessor.TotalScore.Value, () => Is.EqualTo(1_000_030)); + AddAssert("score is correct", () => currentPlayer.ScoreProcessor.TotalScore.Value, () => Is.EqualTo(1_000_000)); } [Test] @@ -87,7 +87,7 @@ public void TestSimultaneousLongNotes() AddAssert("all objects perfectly judged", () => judgementResults.Select(result => result.Type), () => Is.EquivalentTo(judgementResults.Select(result => result.Judgement.MaxResult))); - AddAssert("score is correct", () => currentPlayer.ScoreProcessor.TotalScore.Value, () => Is.EqualTo(1_000_040)); + AddAssert("score is correct", () => currentPlayer.ScoreProcessor.TotalScore.Value, () => Is.EqualTo(1_000_000)); } private void performTest(List hitObjects, List frames)