1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 20:53:04 +08:00

Enable NRT in test scene

This commit is contained in:
Bartłomiej Dach 2024-09-17 08:22:37 +02:00
parent a99dbfa768
commit 3e63fe399f
No known key found for this signature in database

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Utils; using osu.Framework.Utils;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
@ -22,9 +20,9 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
{ {
public partial class TestSceneSliderSelectionBlueprint : SelectionBlueprintTestScene public partial class TestSceneSliderSelectionBlueprint : SelectionBlueprintTestScene
{ {
private Slider slider; private Slider slider = null!;
private DrawableSlider drawableObject; private DrawableSlider drawableObject = null!;
private TestSliderBlueprint blueprint; private TestSliderBlueprint blueprint = null!;
[SetUp] [SetUp]
public void Setup() => Schedule(() => public void Setup() => Schedule(() =>
@ -233,14 +231,14 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
} }
private void checkControlPointSelected(int index, bool selected) private void checkControlPointSelected(int index, bool selected)
=> AddAssert($"control point {index} {(selected ? "selected" : "not selected")}", () => blueprint.ControlPointVisualiser.Pieces[index].IsSelected.Value == selected); => AddAssert($"control point {index} {(selected ? "selected" : "not selected")}", () => blueprint.ControlPointVisualiser!.Pieces[index].IsSelected.Value == selected);
private partial class TestSliderBlueprint : SliderSelectionBlueprint private partial class TestSliderBlueprint : SliderSelectionBlueprint
{ {
public new SliderBodyPiece BodyPiece => base.BodyPiece; public new SliderBodyPiece BodyPiece => base.BodyPiece;
public new TestSliderCircleOverlay HeadOverlay => (TestSliderCircleOverlay)base.HeadOverlay; public new TestSliderCircleOverlay HeadOverlay => (TestSliderCircleOverlay)base.HeadOverlay;
public new TestSliderCircleOverlay TailOverlay => (TestSliderCircleOverlay)base.TailOverlay; public new TestSliderCircleOverlay TailOverlay => (TestSliderCircleOverlay)base.TailOverlay;
public new PathControlPointVisualiser<Slider> ControlPointVisualiser => base.ControlPointVisualiser; public new PathControlPointVisualiser<Slider>? ControlPointVisualiser => base.ControlPointVisualiser;
public TestSliderBlueprint(Slider slider) public TestSliderBlueprint(Slider slider)
: base(slider) : base(slider)