Add failing test case for insufficient sample query leniency

This commit is contained in:
Bartłomiej Dach 2023-10-20 10:25:28 +02:00
parent f36a671eb4
commit 59a1915451
No known key found for this signature in database
2 changed files with 23 additions and 0 deletions

View File

@ -1080,5 +1080,18 @@ public void TestNaNControlPoints()
Assert.That(controlPoints.DifficultyPointAt(3000).GenerateTicks, Is.True); Assert.That(controlPoints.DifficultyPointAt(3000).GenerateTicks, Is.True);
} }
} }
[Test]
public void TestSamplePointLeniency()
{
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
using (var resStream = TestResources.OpenResource("sample-point-leniency.osu"))
using (var stream = new LineBufferedReader(resStream))
{
var hitObject = decoder.Decode(stream).HitObjects.Single();
Assert.That(hitObject.Samples.Select(s => s.Volume), Has.All.EqualTo(70));
}
}
} }
} }

View File

@ -0,0 +1,10 @@
osu file format v14
# extracted from https://osu.ppy.sh/beatmapsets/1859679#osu/3823636
[TimingPoints]
39166,-117.647058823529,4,2,1,5,0,0
39262,-117.647058823529,4,2,1,70,0,0
[HitObjects]
440,70,39260,1,10,0:2:0:0: