1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Add tests for legacy skin decoding

This commit is contained in:
iiSaLMaN 2019-10-09 23:06:53 +03:00
parent 01ac19fdbb
commit d15db378ce
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,2 @@
[General]
Version: 2

View File

@ -0,0 +1,2 @@
[General]
Version: latest

View File

@ -56,5 +56,16 @@ namespace osu.Game.Tests.Skins
Assert.AreEqual("TestValue", config.ConfigDictionary["TestLookup"]);
}
}
[TestCase("skin-20.ini", 2.0)]
[TestCase("skin-latest.ini", LegacySkinConfiguration.LATEST_VERSION)]
[TestCase("skin-empty.ini", null)]
public void TestDecodeVersion(string filename, double? expected)
{
var decoder = new LegacySkinDecoder();
using (var resStream = TestResources.OpenResource(filename))
using (var stream = new LineBufferedReader(resStream))
Assert.AreEqual(expected, decoder.Decode(stream).LegacyVersion);
}
}
}