mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 00:02:54 +08:00
Add test coverage for empty beatmaps
This commit is contained in:
parent
7109c3b6cd
commit
2d070934d9
@ -135,6 +135,17 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value));
|
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestEmptyBeatmap(
|
||||||
|
[Values(ScoringMode.Standardised, ScoringMode.Classic)]
|
||||||
|
ScoringMode scoringMode)
|
||||||
|
{
|
||||||
|
scoreProcessor.Mode.Value = scoringMode;
|
||||||
|
scoreProcessor.ApplyBeatmap(new TestBeatmap(new RulesetInfo()));
|
||||||
|
|
||||||
|
Assert.IsTrue(Precision.AlmostEquals(0, scoreProcessor.TotalScore.Value));
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
||||||
[TestCase(HitResult.Meh, HitResult.Miss)]
|
[TestCase(HitResult.Meh, HitResult.Miss)]
|
||||||
[TestCase(HitResult.Ok, HitResult.Miss)]
|
[TestCase(HitResult.Ok, HitResult.Miss)]
|
||||||
|
Loading…
Reference in New Issue
Block a user