Merge branch 'master' into better-player-flags

This commit is contained in:
Dean Herbert
2019-03-29 13:45:45 +09:00
committed by GitHub
230 changed files with 1564 additions and 1749 deletions

View File

@ -13,6 +13,11 @@ namespace osu.Game.Tests
public CleanRunHeadlessGameHost(string gameName = @"", bool bindIPC = false, bool realtime = true)
: base(gameName, bindIPC, realtime)
{
}
protected override void SetupForRun()
{
base.SetupForRun();
Storage.DeleteDirectory(string.Empty);
}
}

View File

@ -14,8 +14,7 @@ namespace osu.Game.Tests.Visual
protected ManualInputManagerTestCase()
{
base.Content.Add(InputManager = new ManualInputManager());
ReturnUserInput();
base.Content.Add(InputManager = new ManualInputManager { UseParentInput = true });
}
/// <summary>

View File

@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual
protected OsuTestCase()
{
localStorage = new Lazy<Storage>(() => new DesktopStorage($"{GetType().Name}-{Guid.NewGuid()}", null));
localStorage = new Lazy<Storage>(() => new NativeStorage($"{GetType().Name}-{Guid.NewGuid()}"));
}
[BackgroundDependencyLoader]

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Testing;
@ -23,7 +24,11 @@ namespace osu.Game.Tests.Visual
protected PlayerTestCase(Ruleset ruleset)
{
this.ruleset = ruleset;
}
[BackgroundDependencyLoader]
private void load()
{
Add(new Box
{
RelativeSizeAxes = Axes.Both,

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Screens;
@ -9,13 +10,14 @@ namespace osu.Game.Tests.Visual
/// <summary>
/// A test case which can be used to test a screen (that relies on OnEntering being called to execute startup instructions).
/// </summary>
public abstract class ScreenTestCase : OsuTestCase
public abstract class ScreenTestCase : ManualInputManagerTestCase
{
private readonly OsuScreenStack stack;
private OsuScreenStack stack;
protected ScreenTestCase()
[BackgroundDependencyLoader]
private void load()
{
Child = stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
Add(stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both });
}
protected void LoadScreen(OsuScreen screen)