mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Fix test caching woes
This commit is contained in:
parent
7f4ea5d522
commit
93c94b8ea0
@ -2,10 +2,13 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Screens.Edit;
|
||||||
using osu.Game.Screens.Edit.Components;
|
using osu.Game.Screens.Edit.Components;
|
||||||
|
using osu.Game.Tests.Beatmaps;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Editing
|
namespace osu.Game.Tests.Visual.Editing
|
||||||
@ -13,6 +16,9 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneEditorClock : EditorClockTestScene
|
public class TestSceneEditorClock : EditorClockTestScene
|
||||||
{
|
{
|
||||||
|
[Cached]
|
||||||
|
private EditorBeatmap editorBeatmap = new EditorBeatmap(new TestBeatmap(new OsuRuleset().RulesetInfo));
|
||||||
|
|
||||||
public TestSceneEditorClock()
|
public TestSceneEditorClock()
|
||||||
{
|
{
|
||||||
Add(new FillFlowContainer
|
Add(new FillFlowContainer
|
||||||
|
@ -6,7 +6,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets.Edit;
|
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
@ -20,20 +19,16 @@ namespace osu.Game.Tests.Visual
|
|||||||
[Cached]
|
[Cached]
|
||||||
private readonly OverlayColourProvider overlayColour = new OverlayColourProvider(OverlayColourScheme.Aquamarine);
|
private readonly OverlayColourProvider overlayColour = new OverlayColourProvider(OverlayColourScheme.Aquamarine);
|
||||||
|
|
||||||
[Cached(typeof(EditorBeatmap))]
|
|
||||||
[Cached(typeof(IBeatSnapProvider))]
|
|
||||||
private readonly EditorBeatmap editorBeatmap;
|
|
||||||
|
|
||||||
protected readonly BindableBeatDivisor BeatDivisor = new BindableBeatDivisor();
|
protected readonly BindableBeatDivisor BeatDivisor = new BindableBeatDivisor();
|
||||||
|
|
||||||
|
[Cached]
|
||||||
protected new readonly EditorClock Clock;
|
protected new readonly EditorClock Clock;
|
||||||
|
|
||||||
protected virtual bool ScrollUsingMouseWheel => true;
|
protected virtual bool ScrollUsingMouseWheel => true;
|
||||||
|
|
||||||
protected EditorClockTestScene()
|
protected EditorClockTestScene()
|
||||||
{
|
{
|
||||||
editorBeatmap = new EditorBeatmap(new Beatmap());
|
Clock = new EditorClock(new Beatmap(), BeatDivisor) { IsCoupled = false };
|
||||||
|
|
||||||
Clock = new EditorClock(editorBeatmap, BeatDivisor) { IsCoupled = false };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
|
Loading…
Reference in New Issue
Block a user