Remove default combo colours on empty skin test

Checked differently in TestSceneSkinConfigurationLookup.TestEmptyComboColours()
This commit is contained in:
iiSaLMaN 2019-10-09 21:15:30 +03:00
parent c2ada81c23
commit 8d40c1b733
2 changed files with 10 additions and 17 deletions

View File

@ -1,2 +0,0 @@
[General]
Name: test skin

View File

@ -13,28 +13,23 @@ namespace osu.Game.Tests.Skins
[TestFixture]
public class LegacySkinDecoderTest
{
[TestCase(true)]
[TestCase(false)]
public void TestDecodeSkinColours(bool hasColours)
[Test]
public void TestDecodeSkinColours()
{
var decoder = new LegacySkinDecoder();
using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini"))
using (var resStream = TestResources.OpenResource("skin.ini"))
using (var stream = new LineBufferedReader(resStream))
{
var comboColors = decoder.Decode(stream).ComboColours;
List<Color4> expectedColors;
if (hasColours)
expectedColors = new List<Color4>
{
new Color4(142, 199, 255, 255),
new Color4(255, 128, 128, 255),
new Color4(128, 255, 255, 255),
new Color4(100, 100, 100, 100),
};
else
expectedColors = new DefaultSkin().Configuration.ComboColours;
List<Color4> expectedColors = new List<Color4>
{
new Color4(142, 199, 255, 255),
new Color4(255, 128, 128, 255),
new Color4(128, 255, 255, 255),
new Color4(100, 100, 100, 100),
};
Assert.AreEqual(expectedColors.Count, comboColors.Count);
for (int i = 0; i < expectedColors.Count; i++)