Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Dec 20, 2023
1 parent e0c2751 commit d417b15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand All @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions osu.Game.Rulesets.Mania.Tests/TestSceneHoldNoteInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Mania.Tests/TestSceneMaximumScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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<ManiaHitObject> hitObjects, List<ReplayFrame> frames)
Expand Down

0 comments on commit d417b15

Please sign in to comment.