Skip to content

Commit

Permalink
Merge pull request #16111 from smoogipoo/test-hyper-generation
Browse files Browse the repository at this point in the history
Test hyperdash generation in catch conversion tests
  • Loading branch information
bdach authored Dec 17, 2021
2 parents dff08b2 + 84c585e commit 869e309
Show file tree
Hide file tree
Showing 11 changed files with 967 additions and 424 deletions.
13 changes: 12 additions & 1 deletion osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class CatchBeatmapConversionTest : BeatmapConversionTest<ConvertValue>
[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<ConvertValue> CreateConvertValue(HitObject hitObject)
Expand Down Expand Up @@ -70,6 +71,7 @@ public ConvertValue(CatchHitObject hitObject)
HitObject = hitObject;
startTime = 0;
position = 0;
hyperDash = false;
}

private double startTime;
Expand All @@ -88,8 +90,17 @@ public float Position
set => position = value;
}

private bool hyperDash;

public bool HyperDash
{
get => (HitObject as PalpableCatchHitObject)?.HyperDash ?? hyperDash;
set => hyperDash = value;
}

public bool Equals(ConvertValue other)
=> Precision.AlmostEquals(StartTime, other.StartTime, conversion_lenience)
&& Precision.AlmostEquals(Position, other.Position, conversion_lenience);
&& Precision.AlmostEquals(Position, other.Position, conversion_lenience)
&& HyperDash == other.HyperDash;
}
}
Loading

0 comments on commit 869e309

Please sign in to comment.