1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 03:23:32 +08:00
osu-lazer/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs

50 lines
1.2 KiB
C#
Raw Normal View History

2020-03-31 13:57:37 +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.
2022-06-17 15:37:17 +08:00
#nullable disable
2020-03-31 13:57:37 +08: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 13:57:37 +08:00
{
[TestCase(new[]
{
true
2020-03-31 13:57:37 +08:00
}, 1)]
[TestCase(new[]
{
false,
false,
false,
false
2020-03-31 13:57:37 +08:00
}, 4)]
[TestCase(new[]
{
false,
false,
false,
true,
false,
false,
false
2020-03-31 13:57:37 +08:00
}, 7)]
public void Test(IEnumerable<bool> special, int columns)
2020-03-31 13:57:37 +08:00
{
var definition = new StageDefinition(columns);
2020-03-31 13:57:37 +08:00
var results = getResults(definition);
Assert.AreEqual(special, results);
2020-03-31 13:57:37 +08:00
}
private IEnumerable<bool> getResults(StageDefinition definition)
2020-03-31 13:57:37 +08:00
{
for (int i = 0; i < definition.Columns; i++)
yield return definition.IsSpecialColumn(i);
2020-03-31 13:57:37 +08:00
}
}
}