mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
Add a fake load to visual test to restore previous testing behaviour
This commit is contained in:
parent
c362a93a36
commit
fb4efd992d
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
@ -45,7 +46,10 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
},
|
},
|
||||||
gameplayClockContainer = new MasterGameplayClockContainer(Beatmap.Value, skip_target_time)
|
gameplayClockContainer = new MasterGameplayClockContainer(Beatmap.Value, skip_target_time)
|
||||||
{
|
{
|
||||||
Child = frameStabilityContainer = new FrameStabilityContainer()
|
Child = frameStabilityContainer = new FrameStabilityContainer
|
||||||
|
{
|
||||||
|
Child = new FakeLoad()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -53,6 +57,15 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
Dependencies.CacheAs<IFrameStableClock>(frameStabilityContainer);
|
Dependencies.CacheAs<IFrameStableClock>(frameStabilityContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private partial class FakeLoad : Drawable
|
||||||
|
{
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
Thread.Sleep(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
public void SetupSteps()
|
public void SetupSteps()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user