mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
And then everything became one
This commit is contained in:
33
osu.Game/Tests/Visual/OsuTestCase.cs
Normal file
33
osu.Game/Tests/Visual/OsuTestCase.cs
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Testing;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class OsuTestCase : TestCase
|
||||
{
|
||||
public override void RunTest()
|
||||
{
|
||||
using (var host = new HeadlessGameHost(realtime: false))
|
||||
host.Run(new OsuTestCaseTestRunner(this));
|
||||
}
|
||||
|
||||
public class OsuTestCaseTestRunner : OsuGameBase
|
||||
{
|
||||
private readonly OsuTestCase testCase;
|
||||
|
||||
public OsuTestCaseTestRunner(OsuTestCase testCase)
|
||||
{
|
||||
this.testCase = testCase;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
Add(new TestCaseTestRunner.TestRunner(testCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user