mirror of https://github.com/ppy/osu
More tests to showcase failures
This commit is contained in:
parent
7aa10956b5
commit
19bc6b72cc
|
@ -204,21 +204,25 @@ public void TestDecodeOverlappingTimingPoints()
|
|||
{
|
||||
var controlPoints = decoder.Decode(stream).ControlPointInfo;
|
||||
|
||||
Assert.That(controlPoints.DifficultyPoints, Has.Count.EqualTo(2));
|
||||
Assert.That(controlPoints.DifficultyPoints[0].SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPoints[1].SpeedMultiplier, Is.EqualTo(0.75).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(1500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(2500).SpeedMultiplier, Is.EqualTo(0.75).Within(0.1));
|
||||
Assert.That(controlPoints.DifficultyPointAt(3500).SpeedMultiplier, Is.EqualTo(1.5).Within(0.1));
|
||||
|
||||
Assert.That(controlPoints.EffectPoints, Has.Count.EqualTo(2));
|
||||
Assert.That(controlPoints.EffectPoints[0].KiaiMode, Is.True);
|
||||
Assert.That(controlPoints.EffectPoints[1].KiaiMode, Is.True);
|
||||
Assert.That(controlPoints.EffectPointAt(500).KiaiMode, Is.True);
|
||||
Assert.That(controlPoints.EffectPointAt(1500).KiaiMode, Is.True);
|
||||
Assert.That(controlPoints.EffectPointAt(2500).KiaiMode, Is.False);
|
||||
Assert.That(controlPoints.EffectPointAt(3500).KiaiMode, Is.True);
|
||||
|
||||
Assert.That(controlPoints.SamplePoints, Has.Count.EqualTo(2));
|
||||
Assert.That(controlPoints.SamplePoints[0].SampleBank, Is.EqualTo("drum"));
|
||||
Assert.That(controlPoints.SamplePoints[1].SampleBank, Is.EqualTo("normal"));
|
||||
Assert.That(controlPoints.SamplePointAt(500).SampleBank, Is.EqualTo("drum"));
|
||||
Assert.That(controlPoints.SamplePointAt(1500).SampleBank, Is.EqualTo("drum"));
|
||||
Assert.That(controlPoints.SamplePointAt(2500).SampleBank, Is.EqualTo("normal"));
|
||||
Assert.That(controlPoints.SamplePointAt(3500).SampleBank, Is.EqualTo("drum"));
|
||||
|
||||
Assert.That(controlPoints.TimingPoints, Has.Count.EqualTo(2));
|
||||
Assert.That(controlPoints.TimingPoints[0].BeatLength, Is.EqualTo(500));
|
||||
Assert.That(controlPoints.TimingPoints[1].BeatLength, Is.EqualTo(250));
|
||||
Assert.That(controlPoints.TimingPointAt(500).BeatLength, Is.EqualTo(500));
|
||||
Assert.That(controlPoints.TimingPointAt(1500).BeatLength, Is.EqualTo(500));
|
||||
Assert.That(controlPoints.TimingPointAt(2500).BeatLength, Is.EqualTo(250));
|
||||
Assert.That(controlPoints.TimingPointAt(3500).BeatLength, Is.EqualTo(500));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,18 @@ osu file format v14
|
|||
|
||||
[TimingPoints]
|
||||
|
||||
// Timing -> Inherited
|
||||
// Timing then inherited
|
||||
0,500,4,2,0,100,1,0
|
||||
0,-66.6666666666667,4,3,0,100,0,1
|
||||
|
||||
// Inherited -> Timing
|
||||
1000,-133.333333333333,4,1,0,100,0,1
|
||||
1000,250,4,2,0,100,1,0
|
||||
// Inherited then timing (equivalent to previous)
|
||||
1000,-66.6666666666667,4,3,0,100,0,1
|
||||
1000,500,4,2,0,100,1,0
|
||||
|
||||
// Inherited then timing (different to previous)
|
||||
2000,-133.333333333333,4,1,0,100,0,0
|
||||
2000,250,4,2,0,100,1,0
|
||||
|
||||
// Timing then inherited (different to previous)
|
||||
3000,500,4,2,0,100,1,0
|
||||
3000,-66.6666666666667,4,3,0,100,0,1
|
||||
|
|
Loading…
Reference in New Issue