2020-05-19 22:28:13 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System.Linq;
|
2020-05-20 09:14:08 +08:00
|
|
|
using osu.Framework.Testing;
|
2020-05-19 22:28:13 +08:00
|
|
|
using osu.Game.Audio;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Taiko has some interesting rules for legacy mappings.
|
|
|
|
/// </summary>
|
2020-05-20 09:14:08 +08:00
|
|
|
[HeadlessTest]
|
2020-06-04 03:00:02 +08:00
|
|
|
public class TestSceneSampleOutput : TestSceneTaikoPlayer
|
2020-05-19 22:28:13 +08:00
|
|
|
{
|
|
|
|
public override void SetUpSteps()
|
|
|
|
{
|
|
|
|
base.SetUpSteps();
|
|
|
|
AddAssert("has correct samples", () =>
|
|
|
|
{
|
|
|
|
var names = Player.DrawableRuleset.Playfield.AllHitObjects.OfType<DrawableHit>().Select(h => string.Join(',', h.GetSamples().Select(s => s.Name)));
|
|
|
|
|
|
|
|
var expected = new[]
|
|
|
|
{
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
string.Empty,
|
|
|
|
HitSampleInfo.HIT_FINISH,
|
|
|
|
HitSampleInfo.HIT_WHISTLE,
|
|
|
|
HitSampleInfo.HIT_WHISTLE,
|
|
|
|
HitSampleInfo.HIT_WHISTLE,
|
|
|
|
};
|
|
|
|
|
|
|
|
return names.SequenceEqual(expected);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset) => new TaikoBeatmapConversionTest().GetBeatmap("sample-to-type-conversions");
|
|
|
|
}
|
|
|
|
}
|