mirror of
https://github.com/osukey/osukey.git
synced 2025-05-02 20:27:27 +09:00
Remove default combo colours on empty skin test
Checked differently in TestSceneSkinConfigurationLookup.TestEmptyComboColours()
This commit is contained in:
parent
c2ada81c23
commit
8d40c1b733
@ -1,2 +0,0 @@
|
|||||||
[General]
|
|
||||||
Name: test skin
|
|
@ -13,28 +13,23 @@ namespace osu.Game.Tests.Skins
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class LegacySkinDecoderTest
|
public class LegacySkinDecoderTest
|
||||||
{
|
{
|
||||||
[TestCase(true)]
|
[Test]
|
||||||
[TestCase(false)]
|
public void TestDecodeSkinColours()
|
||||||
public void TestDecodeSkinColours(bool hasColours)
|
|
||||||
{
|
{
|
||||||
var decoder = new LegacySkinDecoder();
|
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))
|
using (var stream = new LineBufferedReader(resStream))
|
||||||
{
|
{
|
||||||
var comboColors = decoder.Decode(stream).ComboColours;
|
var comboColors = decoder.Decode(stream).ComboColours;
|
||||||
|
|
||||||
List<Color4> expectedColors;
|
List<Color4> expectedColors = new List<Color4>
|
||||||
if (hasColours)
|
|
||||||
expectedColors = new List<Color4>
|
|
||||||
{
|
{
|
||||||
new Color4(142, 199, 255, 255),
|
new Color4(142, 199, 255, 255),
|
||||||
new Color4(255, 128, 128, 255),
|
new Color4(255, 128, 128, 255),
|
||||||
new Color4(128, 255, 255, 255),
|
new Color4(128, 255, 255, 255),
|
||||||
new Color4(100, 100, 100, 100),
|
new Color4(100, 100, 100, 100),
|
||||||
};
|
};
|
||||||
else
|
|
||||||
expectedColors = new DefaultSkin().Configuration.ComboColours;
|
|
||||||
|
|
||||||
Assert.AreEqual(expectedColors.Count, comboColors.Count);
|
Assert.AreEqual(expectedColors.Count, comboColors.Count);
|
||||||
for (int i = 0; i < expectedColors.Count; i++)
|
for (int i = 0; i < expectedColors.Count; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user