osu/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
C#
Raw Normal View History

2020-03-31 05:57:37 +00: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.
2022-06-17 07:37:17 +00:00
#nullable disable
2020-03-31 05:57:37 +00:00
using System.Collections.Generic;
using osu.Game.Rulesets.Mania.Beatmaps;
using NUnit.Framework;
namespace osu.Game.Rulesets.Mania.Tests
{
[TestFixture]
public class ManiaSpecialColumnTest
2020-03-31 05:57:37 +00:00
{
[TestCase(new[]
{
true
2020-03-31 05:57:37 +00:00
}, 1)]
[TestCase(new[]
{
false,
false,
false,
false
2020-03-31 05:57:37 +00:00
}, 4)]
[TestCase(new[]
{
false,
false,
false,
true,
false,
false,
false
2020-03-31 05:57:37 +00:00
}, 7)]
public void Test(IEnumerable<bool> special, int columns)
2020-03-31 05:57:37 +00:00
{
var definition = new StageDefinition(columns);
2020-03-31 05:57:37 +00:00
var results = getResults(definition);
Assert.AreEqual(special, results);
2020-03-31 05:57:37 +00:00
}
private IEnumerable<bool> getResults(StageDefinition definition)
2020-03-31 05:57:37 +00:00
{
for (int i = 0; i < definition.Columns; i++)
yield return definition.IsSpecialColumn(i);
2020-03-31 05:57:37 +00:00
}
}
}