mirror of
https://github.com/ppy/osu
synced 2025-01-31 18:32:14 +00:00
Fix test failures
This commit is contained in:
parent
9c6968e96d
commit
adea29c106
@ -931,16 +931,14 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
var controlPoints = (LegacyControlPointInfo)decoder.Decode(stream).ControlPointInfo;
|
||||
|
||||
Assert.That(controlPoints.TimingPoints.Count, Is.EqualTo(1));
|
||||
Assert.That(controlPoints.DifficultyPoints.Count, Is.EqualTo(3));
|
||||
Assert.That(controlPoints.DifficultyPoints.Count, Is.EqualTo(2));
|
||||
|
||||
Assert.That(controlPoints.TimingPointAt(1000).BeatLength, Is.EqualTo(500));
|
||||
|
||||
Assert.That(controlPoints.DifficultyPointAt(1000).SliderVelocity, Is.EqualTo(1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(2000).SliderVelocity, Is.EqualTo(1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(3000).SliderVelocity, Is.EqualTo(1));
|
||||
|
||||
#pragma warning disable 618
|
||||
Assert.That(((LegacyBeatmapDecoder.LegacyDifficultyControlPoint)controlPoints.DifficultyPointAt(1000)).GenerateTicks, Is.True);
|
||||
Assert.That(((LegacyBeatmapDecoder.LegacyDifficultyControlPoint)controlPoints.DifficultyPointAt(2000)).GenerateTicks, Is.False);
|
||||
Assert.That(((LegacyBeatmapDecoder.LegacyDifficultyControlPoint)controlPoints.DifficultyPointAt(3000)).GenerateTicks, Is.True);
|
||||
#pragma warning restore 618
|
||||
|
@ -188,9 +188,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
}
|
||||
|
||||
public override bool IsRedundant(ControlPoint? existing)
|
||||
=> existing is LegacyDifficultyControlPoint existingLegacyDifficulty
|
||||
&& base.IsRedundant(existing)
|
||||
&& GenerateTicks == existingLegacyDifficulty.GenerateTicks;
|
||||
=> base.IsRedundant(existing)
|
||||
&& GenerateTicks == ((existing as LegacyDifficultyControlPoint)?.GenerateTicks ?? true);
|
||||
|
||||
public override void CopyFrom(ControlPoint other)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user