Add osu! difficulty calculator test

This commit is contained in:
smoogipoo
2019-02-14 16:22:14 +09:00
parent e174fa2d3e
commit f50a0be29d
3 changed files with 243 additions and 0 deletions

View File

@ -0,0 +1,32 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Osu.Difficulty;
using osu.Game.Tests.Beatmaps;
namespace osu.Game.Rulesets.Osu.Tests
{
[TestFixture]
public class OsuDifficultyCalculatorTest : DifficultyCalculatorTest
{
protected override string ResourceAssembly => "osu.Game.Rulesets.Osu";
[Test]
public new void Test()
{
base.Test(6.9311449688341344, "diffcalc-test");
}
private void openUsingShellExecute(string path) => Process.Start(new ProcessStartInfo
{
FileName = path,
UseShellExecute = true //see https://github.com/dotnet/corefx/issues/10361
});
protected override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new OsuDifficultyCalculator(new OsuRuleset(), beatmap);
}
}