1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Fix outdated test asserts

This commit is contained in:
Dean Herbert 2022-05-06 18:44:25 +09:00
parent 118e58888b
commit daed42513e
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
});
AddStep("move mouse outside grid", () => InputManager.MoveMouseTo(grid.ToScreenSpace(grid_position + new Vector2(beat_length, 0) * 3f)));
assertSnappedDistance(beat_length * 2);
assertSnappedDistance(beat_length);
}
private void assertSnappedDistance(float expectedDistance) => AddAssert($"snap distance = {expectedDistance}", () =>

View File

@ -103,7 +103,7 @@ namespace osu.Game.Tests.Visual.Editing
});
AddStep($"set distance spacing = {multiplier}", () => snapProvider.DistanceSpacingMultiplier.Value = multiplier);
AddAssert("check correct interval count", () => grid.MaxIntervals == (end_time / grid.DistanceBetweenTicks));
AddStep("check correct interval count", () => Assert.That((end_time / grid.DistanceBetweenTicks) * multiplier, Is.EqualTo(grid.MaxIntervals)));
}
private class TestDistanceSnapGrid : DistanceSnapGrid