-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SingerUtils and fix all test error.
- Loading branch information
1 parent
847a131
commit fa89d41
Showing
5 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using NUnit.Framework; | ||
using osu.Game.Rulesets.Karaoke.Utils; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Tests.Utils | ||
{ | ||
[TestFixture] | ||
public class SingerUtilsTest | ||
{ | ||
[TestCase(null, 0)] | ||
[TestCase(new[] { 1 }, 1)] | ||
[TestCase(new[] { 1, 2, 3 }, 7)] | ||
[TestCase(new[] { 1, 4, 5 }, 25)] | ||
public void TestGetShiftingStyleIndex(int[] singerIndexs, int styleIndex) | ||
{ | ||
Assert.AreEqual(SingerUtils.GetShiftingStyleIndex(singerIndexs), styleIndex); | ||
} | ||
|
||
[TestCase(-1, new int[] { })] | ||
[TestCase(0, new int[] { })] | ||
[TestCase(1, new[] { 1 })] | ||
[TestCase(7, new[] { 1, 2, 3 })] | ||
[TestCase(25, new[] { 1, 4, 5 })] | ||
public void TestGetSingersIndex(int styleIndex, int[] singerIndexs) | ||
{ | ||
Assert.AreEqual(SingerUtils.GetSingersIndex(styleIndex), singerIndexs); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters