Add nested hitobject tests for few hitsounds check

This commit is contained in:
Naxess 2021-06-27 15:58:00 +02:00
parent 1dbac76da5
commit b58644106c
1 changed files with 32 additions and 0 deletions

View File

@ -140,6 +140,38 @@ public void TestNotHitsounded()
assertNoHitsounds(hitObjects); assertNoHitsounds(hitObjects);
} }
[Test]
public void TestNestedObjectsHitsounded()
{
var ticks = new List<HitObject>();
for (int i = 1; i < 16; ++i)
ticks.Add(new SliderTick { StartTime = 1000 * i, Samples = hitsounded });
var nested = new MockNestableHitObject(ticks.ToList(), 0, 16000)
{
Samples = hitsounded
};
nested.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
assertOk(new List<HitObject> { nested });
}
[Test]
public void TestNestedObjectsRarelyHitsounded()
{
var ticks = new List<HitObject>();
for (int i = 1; i < 16; ++i)
ticks.Add(new SliderTick { StartTime = 1000 * i, Samples = i == 0 ? hitsounded : notHitsounded });
var nested = new MockNestableHitObject(ticks.ToList(), 0, 16000)
{
Samples = hitsounded
};
nested.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
assertLongPeriodWarning(new List<HitObject> { nested });
}
[Test] [Test]
public void TestConcurrentObjects() public void TestConcurrentObjects()
{ {