mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 09:42:54 +08:00
Add failing test coverage for checking taiko HP too
I was wrong, taiko uses HP (to calculate miss penalty).
This commit is contained in:
parent
9b923b1909
commit
8fb308c192
@ -52,6 +52,18 @@ namespace osu.Game.Rulesets.Taiko.Tests.Editor.Checks
|
||||
Assert.That(issues.Single().Template is CheckAbnormalDifficultySettings.IssueTemplateMoreThanOneDecimal);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDrainRateTwoDecimals()
|
||||
{
|
||||
beatmap.Difficulty.DrainRate = 5.55f;
|
||||
|
||||
var context = getContext();
|
||||
var issues = check.Run(context).ToList();
|
||||
|
||||
Assert.That(issues, Has.Count.EqualTo(1));
|
||||
Assert.That(issues.Single().Template is CheckAbnormalDifficultySettings.IssueTemplateMoreThanOneDecimal);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOverallDifficultyUnder()
|
||||
{
|
||||
@ -76,6 +88,30 @@ namespace osu.Game.Rulesets.Taiko.Tests.Editor.Checks
|
||||
Assert.That(issues.Single().Template is CheckAbnormalDifficultySettings.IssueTemplateOutOfRange);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDrainRateUnder()
|
||||
{
|
||||
beatmap.Difficulty.DrainRate = -10;
|
||||
|
||||
var context = getContext();
|
||||
var issues = check.Run(context).ToList();
|
||||
|
||||
Assert.That(issues, Has.Count.EqualTo(1));
|
||||
Assert.That(issues.Single().Template is CheckAbnormalDifficultySettings.IssueTemplateOutOfRange);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDrainRateOver()
|
||||
{
|
||||
beatmap.Difficulty.DrainRate = 20;
|
||||
|
||||
var context = getContext();
|
||||
var issues = check.Run(context).ToList();
|
||||
|
||||
Assert.That(issues, Has.Count.EqualTo(1));
|
||||
Assert.That(issues.Single().Template is CheckAbnormalDifficultySettings.IssueTemplateOutOfRange);
|
||||
}
|
||||
|
||||
private BeatmapVerifierContext getContext()
|
||||
{
|
||||
return new BeatmapVerifierContext(beatmap, new TestWorkingBeatmap(beatmap));
|
||||
|
Loading…
Reference in New Issue
Block a user