1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00
osu-lazer/osu.Game.Tests/Gameplay/TestSceneMasterGameplayClockContainer.cs

33 lines
985 B
C#
Raw Normal View History

2020-06-14 10:34:07 +08:00
// 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 NUnit.Framework;
2020-06-19 21:43:25 +08:00
using osu.Framework.Testing;
2020-06-14 10:34:07 +08:00
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Play;
using osu.Game.Tests.Visual;
namespace osu.Game.Tests.Gameplay
{
2020-06-19 21:43:25 +08:00
[HeadlessTest]
2021-04-16 19:51:42 +08:00
public class TestSceneMasterGameplayClockContainer : OsuTestScene
2020-06-14 10:34:07 +08:00
{
[Test]
public void TestStartThenElapsedTime()
{
GameplayClockContainer gcc = null;
2020-08-06 17:31:08 +08:00
AddStep("create container", () =>
{
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
2020-08-17 14:38:16 +08:00
working.LoadTrack();
2021-04-14 16:47:11 +08:00
Add(gcc = new MasterGameplayClockContainer(working, 0));
2020-08-06 17:31:08 +08:00
});
2020-06-14 10:34:07 +08:00
AddStep("start track", () => gcc.Start());
AddUntilStep("elapsed greater than zero", () => gcc.GameplayClock.ElapsedFrameTime > 0);
}
}
}