Introduce concept of HitObjectParsers, fix tests and stop using reflection (unreliable due to lazy loading).

This commit is contained in:
Dean Herbert
2016-11-14 22:03:39 +09:00
parent 0011d7f720
commit d3f810f72f
19 changed files with 146 additions and 59 deletions

View File

@ -7,6 +7,7 @@ using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats;
using osu.Game.Beatmaps.Samples;
using osu.Game.Modes;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Screens.Play;
using osu.Game.Tests.Resources;
@ -20,6 +21,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void SetUp()
{
OsuLegacyDecoder.Register();
Ruleset.Register(new OsuRuleset());
}
[Test]

View File

@ -9,6 +9,10 @@ using osu.Framework.Platform;
using osu.Game.Database;
using osu.Game.IPC;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Beatmaps.IO
@ -21,6 +25,10 @@ namespace osu.Game.Tests.Beatmaps.IO
[OneTimeSetUp]
public void SetUp()
{
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
}
[Test]

View File

@ -2,6 +2,8 @@
using System.IO;
using NUnit.Framework;
using osu.Game.Beatmaps.IO;
using osu.Game.Modes;
using osu.Game.Modes.Osu;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Beatmaps.IO
@ -13,8 +15,9 @@ namespace osu.Game.Tests.Beatmaps.IO
public void SetUp()
{
OszArchiveReader.Register();
Ruleset.Register(new OsuRuleset());
}
[Test]
public void TestReadBeatmaps()
{

View File

@ -70,6 +70,18 @@
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
<Name>osu.Game</Name>