1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 03:42:57 +08:00

Add test coverage for missing hyperdashes on simultaneous notes

This commit is contained in:
Bartłomiej Dach 2023-12-04 09:26:23 +01:00
parent 0652ea316d
commit bb198e0c5a
No known key found for this signature in database

View File

@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Catch.Tests
AddAssert("First note is hyperdash", () => Beatmap.Value.Beatmap.HitObjects[0] is Fruit f && f.HyperDash);
for (int i = 0; i < 9; i++)
for (int i = 0; i < 11; i++)
{
int count = i + 1;
AddUntilStep($"wait for hyperdash #{count}", () => hyperDashCount >= count);
@ -100,12 +100,22 @@ namespace osu.Game.Rulesets.Catch.Tests
})
}, 1);
createObjects(() => new Fruit { X = right_x }, count: 2, spacing: 0, spacingAfterGroup: 400);
createObjects(() => new TestJuiceStream(left_x)
{
Path = new SliderPath(new[]
{
new PathControlPoint(Vector2.Zero),
new PathControlPoint(new Vector2(0, 300))
})
}, count: 1, spacingAfterGroup: 150);
createObjects(() => new Fruit { X = left_x }, count: 1, spacing: 0, spacingAfterGroup: 400);
createObjects(() => new Fruit { X = right_x }, count: 2, spacing: 0);
return beatmap;
void createObjects(Func<CatchHitObject> createObject, int count = 3)
void createObjects(Func<CatchHitObject> createObject, int count = 3, float spacing = 140, float spacingAfterGroup = 700)
{
const float spacing = 140;
for (int i = 0; i < count; i++)
{
var hitObject = createObject();
@ -113,7 +123,7 @@ namespace osu.Game.Rulesets.Catch.Tests
beatmap.HitObjects.Add(hitObject);
}
startTime += 700;
startTime += spacingAfterGroup;
}
}