diff --git a/osu.Game.Rulesets.Tau.Tests/NonVisual/PolarSliderPathTests.cs b/osu.Game.Rulesets.Tau.Tests/NonVisual/PolarSliderPathTests.cs index ed95fbb1..3c1eef6f 100644 --- a/osu.Game.Rulesets.Tau.Tests/NonVisual/PolarSliderPathTests.cs +++ b/osu.Game.Rulesets.Tau.Tests/NonVisual/PolarSliderPathTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using NUnit.Framework.Legacy; using osu.Game.Rulesets.Tau.Objects; using System.Linq; @@ -16,17 +17,17 @@ public void TestNodeAt() new(400, 50), }); - Assert.AreEqual(50, path.AngleAt(-50)); - Assert.AreEqual(50, path.AngleAt(0)); - Assert.AreEqual(55, path.AngleAt(50)); - Assert.AreEqual(60, path.AngleAt(100)); - Assert.AreEqual(65, path.AngleAt(150)); - Assert.AreEqual(70, path.AngleAt(200)); - Assert.AreEqual(65, path.AngleAt(250)); - Assert.AreEqual(60, path.AngleAt(300)); - Assert.AreEqual(55, path.AngleAt(350)); - Assert.AreEqual(50, path.AngleAt(400)); - Assert.AreEqual(50, path.AngleAt(450)); + ClassicAssert.AreEqual(50, path.AngleAt(-50)); + ClassicAssert.AreEqual(50, path.AngleAt(0)); + ClassicAssert.AreEqual(55, path.AngleAt(50)); + ClassicAssert.AreEqual(60, path.AngleAt(100)); + ClassicAssert.AreEqual(65, path.AngleAt(150)); + ClassicAssert.AreEqual(70, path.AngleAt(200)); + ClassicAssert.AreEqual(65, path.AngleAt(250)); + ClassicAssert.AreEqual(60, path.AngleAt(300)); + ClassicAssert.AreEqual(55, path.AngleAt(350)); + ClassicAssert.AreEqual(50, path.AngleAt(400)); + ClassicAssert.AreEqual(50, path.AngleAt(450)); } [Test] @@ -38,12 +39,12 @@ public void TestNodeAtNegatives() new(200, 10), }); - Assert.AreEqual(-10, path.AngleAt(-50)); - Assert.AreEqual(-10, path.AngleAt(0)); - Assert.AreEqual(-5, path.AngleAt(50)); - Assert.AreEqual(0, path.AngleAt(100)); - Assert.AreEqual(5, path.AngleAt(150)); - Assert.AreEqual(10, path.AngleAt(200)); + ClassicAssert.AreEqual(-10, path.AngleAt(-50)); + ClassicAssert.AreEqual(-10, path.AngleAt(0)); + ClassicAssert.AreEqual(-5, path.AngleAt(50)); + ClassicAssert.AreEqual(0, path.AngleAt(100)); + ClassicAssert.AreEqual(5, path.AngleAt(150)); + ClassicAssert.AreEqual(10, path.AngleAt(200)); } [Test] @@ -58,18 +59,18 @@ public void TestNodesBetween() var nodes = path.NodesBetween(50, 250).ToArray(); - Assert.IsNotEmpty(nodes); - Assert.AreEqual(2, nodes.Length); - Assert.AreEqual(60, nodes[0].Angle); - Assert.AreEqual(70, nodes[1].Angle); + ClassicAssert.IsNotEmpty(nodes); + ClassicAssert.AreEqual(2, nodes.Length); + ClassicAssert.AreEqual(60, nodes[0].Angle); + ClassicAssert.AreEqual(70, nodes[1].Angle); nodes = path.NodesBetween(50, 60).ToArray(); - Assert.IsEmpty(nodes); + ClassicAssert.IsEmpty(nodes); nodes = path.NodesBetween(90, 110).ToArray(); - Assert.IsNotEmpty(nodes); - Assert.AreEqual(1, nodes.Length); - Assert.AreEqual(60, nodes[0].Angle); + ClassicAssert.IsNotEmpty(nodes); + ClassicAssert.AreEqual(1, nodes.Length); + ClassicAssert.AreEqual(60, nodes[0].Angle); } [Test] @@ -82,11 +83,11 @@ public void TestCalculatedDistance() new(400, 50), }); - Assert.AreEqual(0, path.Version.Value); - Assert.AreEqual(40, path.CalculatedDistance); - Assert.AreEqual(0, path.Version.Value); - Assert.AreEqual(20, path.CalculateLazyDistance(10)); - Assert.AreEqual(0, path.CalculateLazyDistance(20)); + ClassicAssert.AreEqual(0, path.Version.Value); + ClassicAssert.AreEqual(40, path.CalculatedDistance); + ClassicAssert.AreEqual(0, path.Version.Value); + ClassicAssert.AreEqual(20, path.CalculateLazyDistance(10)); + ClassicAssert.AreEqual(0, path.CalculateLazyDistance(20)); } [Test] @@ -100,20 +101,20 @@ public void TestSegments() }); var segments = path.SegmentsBetween(100, 300).ToArray(); - Assert.AreEqual(2, segments.Length); - Assert.AreEqual(60, segments[0].From.Angle); - Assert.AreEqual(60, segments[1].To.Angle); + ClassicAssert.AreEqual(2, segments.Length); + ClassicAssert.AreEqual(60, segments[0].From.Angle); + ClassicAssert.AreEqual(60, segments[1].To.Angle); segments = path.SegmentsBetween(50, 100).ToArray(); - Assert.AreEqual(1, segments.Length); - Assert.AreEqual(55, segments[0].From.Angle); - Assert.AreEqual(60, segments[0].To.Angle); + ClassicAssert.AreEqual(1, segments.Length); + ClassicAssert.AreEqual(55, segments[0].From.Angle); + ClassicAssert.AreEqual(60, segments[0].To.Angle); segments = path.SegmentsBetween(0, 400).ToArray(); - Assert.AreEqual(2, segments.Length); - Assert.AreEqual(50, segments[0].From.Angle); - Assert.AreEqual(70, segments[0].To.Angle); - Assert.AreEqual(50, segments[1].To.Angle); + ClassicAssert.AreEqual(2, segments.Length); + ClassicAssert.AreEqual(50, segments[0].From.Angle); + ClassicAssert.AreEqual(70, segments[0].To.Angle); + ClassicAssert.AreEqual(50, segments[1].To.Angle); } } } diff --git a/osu.Game.Rulesets.Tau.Tests/TestSceneDrawableJudgement.cs b/osu.Game.Rulesets.Tau.Tests/TestSceneDrawableJudgement.cs index 1d4939ff..bbef36e6 100644 --- a/osu.Game.Rulesets.Tau.Tests/TestSceneDrawableJudgement.cs +++ b/osu.Game.Rulesets.Tau.Tests/TestSceneDrawableJudgement.cs @@ -29,6 +29,17 @@ public TestSceneDrawableJudgement() { pools = new List>(); + for (int i = 0; i < 4; ++i) + { + var pool = new DrawablePool(1); + pools.Add(pool); + + Add(new Container + { + Child = pool + }); + } + foreach (var result in Enum.GetValues(typeof(HitResult)).OfType().Skip(1)) { showResult(result); @@ -73,16 +84,10 @@ private void showResult(HitResult result) SetContents(_ => { - DrawablePool pool; + var pool = pools[poolIndex]; - if (poolIndex >= pools.Count) - pools.Add(pool = new DrawablePool(1)); - else - { - pool = pools[poolIndex]; + ((Container)pool.Parent).Clear(false); - ((Container)pool.Parent).Clear(false); - } var container = new Container { @@ -106,7 +111,7 @@ private void showResult(HitResult result) } }; - poolIndex++; + poolIndex = (poolIndex + 1) % 4; return container; }); diff --git a/osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs b/osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs index bc81ddc5..a7c5a862 100644 --- a/osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs +++ b/osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs @@ -10,7 +10,7 @@ public static class VisualTestRunner [STAThread] public static int Main(string[] args) { - using DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }); + using DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"); host.Run(new OsuTestBrowser()); return 0; diff --git a/osu.Game.Rulesets.Tau/Mods/TauModFlashlight.cs b/osu.Game.Rulesets.Tau/Mods/TauModFlashlight.cs index 6cc64595..7eb7f45b 100644 --- a/osu.Game.Rulesets.Tau/Mods/TauModFlashlight.cs +++ b/osu.Game.Rulesets.Tau/Mods/TauModFlashlight.cs @@ -85,9 +85,6 @@ public abstract partial class TauModFlashlight : ModFlashlight, IApplicableTo public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor) { Combo.BindTo(scoreProcessor.Combo); - - // Default value of ScoreProcessor's Rank in Flashlight Mod should be SS+ - scoreProcessor.Rank.Value = ScoreRank.XH; } public ScoreRank AdjustRank(ScoreRank rank, double accuracy) diff --git a/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj b/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj index 4032dfbd..b5791a03 100644 --- a/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj +++ b/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj @@ -35,7 +35,7 @@ - +