From 8a81392d2babc053a12a96139282cad63cf9ffbe Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 16 Dec 2021 19:26:36 +0900 Subject: [PATCH] Fix use of incorrect variable, add test --- .../CatchBeatmapConversionTest.cs | 3 ++- .../basic-hyperdash-expected-conversion.json | 19 +++++++++++++++++ .../Testing/Beatmaps/basic-hyperdash.osu | 21 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash-expected-conversion.json create mode 100644 osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash.osu diff --git a/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs b/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs index 3352982c20..be1885cfa6 100644 --- a/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs +++ b/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs @@ -27,6 +27,7 @@ public class CatchBeatmapConversionTest : BeatmapConversionTest [TestCase("hardrock-repeat-slider", new[] { typeof(CatchModHardRock) })] [TestCase("hardrock-spinner", new[] { typeof(CatchModHardRock) })] [TestCase("right-bound-hr-offset", new[] { typeof(CatchModHardRock) })] + [TestCase("basic-hyperdash")] public new void Test(string name, params Type[] mods) => base.Test(name, mods); protected override IEnumerable CreateConvertValue(HitObject hitObject) @@ -100,6 +101,6 @@ public bool HyperDash public bool Equals(ConvertValue other) => Precision.AlmostEquals(StartTime, other.StartTime, conversion_lenience) && Precision.AlmostEquals(Position, other.Position, conversion_lenience) - && HyperDash == other.hyperDash; + && HyperDash == other.HyperDash; } } diff --git a/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash-expected-conversion.json b/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash-expected-conversion.json new file mode 100644 index 0000000000..b2e9431f13 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash-expected-conversion.json @@ -0,0 +1,19 @@ +{ + "Mappings": [{ + "StartTime": 369, + "Objects": [{ + "StartTime": 369, + "Position": 0, + "HyperDash": true + }] + }, + { + "StartTime": 450, + "Objects": [{ + "StartTime": 450, + "Position": 512, + "HyperDash": false + }] + } + ] +} \ No newline at end of file diff --git a/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash.osu b/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash.osu new file mode 100644 index 0000000000..db07f8c30e --- /dev/null +++ b/osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic-hyperdash.osu @@ -0,0 +1,21 @@ +osu file format v14 + +[General] +StackLeniency: 0.7 +Mode: 2 + +[Difficulty] +HPDrainRate:6 +CircleSize:4 +OverallDifficulty:9.6 +ApproachRate:9.6 +SliderMultiplier:1.9 +SliderTickRate:1 + +[TimingPoints] +2169,266.666666666667,4,2,1,70,1,0 + + +[HitObjects] +0,192,369,1,0,0:0:0:0: +512,192,450,1,0,0:0:0:0: