mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Revert the unit test changes
This commit is contained in:
parent
75c0c6a5f9
commit
3c8d0ce59f
@ -10,7 +10,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
@ -53,7 +52,6 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
|
||||
(typeof(EditorBeatmap), editorBeatmap),
|
||||
(typeof(IBeatSnapProvider), editorBeatmap),
|
||||
(typeof(OverlayColourProvider), new OverlayColourProvider(OverlayColourScheme.Green)),
|
||||
(typeof(OsuContextMenuContainer), new OsuContextMenuContainer()),
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -11,7 +11,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Edit;
|
||||
@ -32,9 +31,6 @@ namespace osu.Game.Rulesets.Mania.Tests.Editor
|
||||
{
|
||||
private TestComposer composer;
|
||||
|
||||
[Cached]
|
||||
public readonly OsuContextMenuContainer ContextMenuContainer = new OsuContextMenuContainer();
|
||||
|
||||
[SetUp]
|
||||
public void Setup() => Schedule(() =>
|
||||
{
|
||||
|
@ -16,7 +16,6 @@ using osu.Framework.Input;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Osu.Beatmaps;
|
||||
@ -80,7 +79,6 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
||||
{
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
dependencies.CacheAs(composer.DistanceSnapProvider);
|
||||
dependencies.Cache(new OsuContextMenuContainer());
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
// 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 System;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Taiko.Beatmaps;
|
||||
using osu.Game.Rulesets.Taiko.Edit;
|
||||
@ -24,14 +22,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Editor
|
||||
BeatDivisor.Value = 8;
|
||||
EditorClock.Seek(0);
|
||||
|
||||
Child = new DependencyProvidingContainer
|
||||
{
|
||||
CachedDependencies = new (Type, object)[]
|
||||
{
|
||||
(typeof(OsuContextMenuContainer), new OsuContextMenuContainer()),
|
||||
},
|
||||
Child = new TestComposer { RelativeSizeAxes = Axes.Both },
|
||||
};
|
||||
Child = new TestComposer { RelativeSizeAxes = Axes.Both };
|
||||
});
|
||||
|
||||
[Test]
|
||||
|
@ -10,7 +10,6 @@ using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
@ -32,9 +31,6 @@ namespace osu.Game.Tests.Editing
|
||||
[Cached(typeof(IBeatSnapProvider))]
|
||||
private readonly EditorBeatmap editorBeatmap;
|
||||
|
||||
[Cached]
|
||||
public readonly OsuContextMenuContainer ContextMenuContainer = new OsuContextMenuContainer();
|
||||
|
||||
protected override Container<Drawable> Content { get; } = new PopoverContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
public TestSceneHitObjectComposerDistanceSnapping()
|
||||
|
@ -10,7 +10,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
@ -53,7 +52,6 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
(typeof(EditorBeatmap), editorBeatmap),
|
||||
(typeof(IBeatSnapProvider), editorBeatmap),
|
||||
(typeof(OverlayColourProvider), new OverlayColourProvider(OverlayColourScheme.Green)),
|
||||
(typeof(OsuContextMenuContainer), new OsuContextMenuContainer())
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -72,21 +72,13 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
AddStep("Create composer", () =>
|
||||
{
|
||||
Child = new DependencyProvidingContainer
|
||||
Child = editorBeatmapContainer = new EditorBeatmapContainer(Beatmap.Value)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CachedDependencies = new (Type, object)[]
|
||||
Child = hitObjectComposer = new OsuHitObjectComposer(new OsuRuleset())
|
||||
{
|
||||
(typeof(OsuContextMenuContainer), new OsuContextMenuContainer())
|
||||
},
|
||||
Child = editorBeatmapContainer = new EditorBeatmapContainer(Beatmap.Value)
|
||||
{
|
||||
Child = hitObjectComposer = new OsuHitObjectComposer(new OsuRuleset())
|
||||
{
|
||||
// force the composer to fully overlap the playfield area by setting a 4:3 aspect ratio.
|
||||
FillMode = FillMode.Fit,
|
||||
FillAspectRatio = 4 / 3f
|
||||
}
|
||||
// force the composer to fully overlap the playfield area by setting a 4:3 aspect ratio.
|
||||
FillMode = FillMode.Fit,
|
||||
FillAspectRatio = 4 / 3f
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user