mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Add failing test cases for strong object sample playback
This commit is contained in:
parent
6d325651dc
commit
812df9d652
@ -109,6 +109,35 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "soft");
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "soft");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestDrumStrongHit()
|
||||||
|
{
|
||||||
|
AddStep("add strong hit with drum samples", () =>
|
||||||
|
{
|
||||||
|
var hit = new Hit
|
||||||
|
{
|
||||||
|
StartTime = 100,
|
||||||
|
Samples = new List<HitSampleInfo>
|
||||||
|
{
|
||||||
|
new HitSampleInfo(HitSampleInfo.HIT_NORMAL, "drum"),
|
||||||
|
new HitSampleInfo(HitSampleInfo.HIT_FINISH, "drum") // implies strong
|
||||||
|
}
|
||||||
|
};
|
||||||
|
hit.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||||
|
var drawableHit = new DrawableHit(hit);
|
||||||
|
hitObjectContainer.Add(drawableHit);
|
||||||
|
});
|
||||||
|
|
||||||
|
AddAssert("most valid object is strong nested hit", () => triggerSource.GetMostValidObject(), Is.InstanceOf<Hit.StrongNestedHit>);
|
||||||
|
checkSound(HitType.Centre, HitSampleInfo.HIT_NORMAL, "drum");
|
||||||
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "drum");
|
||||||
|
|
||||||
|
AddStep("seek past hit", () => manualClock.CurrentTime = 200);
|
||||||
|
AddAssert("most valid object is hit", () => triggerSource.GetMostValidObject(), Is.InstanceOf<Hit>);
|
||||||
|
checkSound(HitType.Centre, HitSampleInfo.HIT_NORMAL, "drum");
|
||||||
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "drum");
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestNormalDrumRoll()
|
public void TestNormalDrumRoll()
|
||||||
{
|
{
|
||||||
@ -177,6 +206,41 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "soft");
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "soft");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestDrumStrongDrumRoll()
|
||||||
|
{
|
||||||
|
AddStep("add strong drum roll with drum samples", () =>
|
||||||
|
{
|
||||||
|
var drumRoll = new DrumRoll
|
||||||
|
{
|
||||||
|
StartTime = 100,
|
||||||
|
EndTime = 1100,
|
||||||
|
Samples = new List<HitSampleInfo>
|
||||||
|
{
|
||||||
|
new HitSampleInfo(HitSampleInfo.HIT_NORMAL, "drum"),
|
||||||
|
new HitSampleInfo(HitSampleInfo.HIT_FINISH, "drum") // implies strong
|
||||||
|
}
|
||||||
|
};
|
||||||
|
drumRoll.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||||
|
var drawableDrumRoll = new DrawableDrumRoll(drumRoll);
|
||||||
|
hitObjectContainer.Add(drawableDrumRoll);
|
||||||
|
});
|
||||||
|
|
||||||
|
AddAssert("most valid object is drum roll tick's nested strong hit", () => triggerSource.GetMostValidObject(), Is.InstanceOf<DrumRollTick.StrongNestedHit>);
|
||||||
|
checkSound(HitType.Centre, HitSampleInfo.HIT_NORMAL, "drum");
|
||||||
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "drum");
|
||||||
|
|
||||||
|
AddStep("seek to middle of drum roll", () => manualClock.CurrentTime = 600);
|
||||||
|
AddAssert("most valid object is drum roll tick's nested strong hit", () => triggerSource.GetMostValidObject(), Is.InstanceOf<DrumRollTick.StrongNestedHit>);
|
||||||
|
checkSound(HitType.Centre, HitSampleInfo.HIT_NORMAL, "drum");
|
||||||
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "drum");
|
||||||
|
|
||||||
|
AddStep("seek past drum roll", () => manualClock.CurrentTime = 1200);
|
||||||
|
AddAssert("most valid object is drum roll", () => triggerSource.GetMostValidObject(), Is.InstanceOf<DrumRoll>);
|
||||||
|
checkSound(HitType.Centre, HitSampleInfo.HIT_NORMAL, "drum");
|
||||||
|
checkSound(HitType.Rim, HitSampleInfo.HIT_CLAP, "drum");
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestNormalSwell()
|
public void TestNormalSwell()
|
||||||
{
|
{
|
||||||
@ -216,7 +280,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
{
|
{
|
||||||
AddStep("add swell with drum samples", () =>
|
AddStep("add swell with drum samples", () =>
|
||||||
{
|
{
|
||||||
var swell = new Swell()
|
var swell = new Swell
|
||||||
{
|
{
|
||||||
StartTime = 100,
|
StartTime = 100,
|
||||||
EndTime = 1100,
|
EndTime = 1100,
|
||||||
|
Loading…
Reference in New Issue
Block a user