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