mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Fix cross-test data dependency by recreating slider every time
This commit is contained in:
parent
96437c4518
commit
89fec95b01
@ -18,26 +18,24 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Cached]
|
[Cached]
|
||||||
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Purple);
|
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
|
|
||||||
private readonly BindableDouble current = new BindableDouble(5)
|
private RoundedSliderBar<double> slider = null!;
|
||||||
|
|
||||||
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
|
{
|
||||||
|
AddStep("create slider", () => Child = slider = new RoundedSliderBar<double>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Current = new BindableDouble(5)
|
||||||
{
|
{
|
||||||
Precision = 0.1,
|
Precision = 0.1,
|
||||||
MinValue = 0,
|
MinValue = 0,
|
||||||
MaxValue = 15
|
MaxValue = 15
|
||||||
};
|
},
|
||||||
|
|
||||||
private RoundedSliderBar<double> slider = null!;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Child = slider = new RoundedSliderBar<double>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Current = current,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Width = 0.4f
|
Width = 0.4f
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -18,26 +18,24 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Cached]
|
[Cached]
|
||||||
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Purple);
|
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
|
|
||||||
private readonly BindableDouble current = new BindableDouble(5)
|
private ShearedSliderBar<double> slider = null!;
|
||||||
|
|
||||||
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
|
{
|
||||||
|
AddStep("create slider", () => Child = slider = new ShearedSliderBar<double>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Current = new BindableDouble(5)
|
||||||
{
|
{
|
||||||
Precision = 0.1,
|
Precision = 0.1,
|
||||||
MinValue = 0,
|
MinValue = 0,
|
||||||
MaxValue = 15
|
MaxValue = 15
|
||||||
};
|
},
|
||||||
|
|
||||||
private ShearedSliderBar<double> slider = null!;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Child = slider = new ShearedSliderBar<double>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Current = current,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Width = 0.4f
|
Width = 0.4f
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
Reference in New Issue
Block a user