mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 12:37:24 +08:00
Merge branch 'master' into fix-repeat-preempt
This commit is contained in:
commit
68f4d91787
@ -9,9 +9,9 @@ install:
|
||||
- cmd: git submodule update --init --recursive --depth=5
|
||||
- cmd: choco install resharper-clt -y
|
||||
- cmd: choco install nvika -y
|
||||
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.2.5/CodeFileSanity.exe
|
||||
- cmd: dotnet tool install CodeFileSanity --version 0.0.16 --global
|
||||
before_build:
|
||||
- cmd: CodeFileSanity.exe
|
||||
- cmd: CodeFileSanity
|
||||
- cmd: nuget restore -verbosity quiet
|
||||
build:
|
||||
project: osu.sln
|
||||
|
@ -54,11 +54,11 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
breadcrumbs.Current.TriggerChange();
|
||||
|
||||
assertCurrent();
|
||||
waitForCurrent();
|
||||
pushNext();
|
||||
assertCurrent();
|
||||
waitForCurrent();
|
||||
pushNext();
|
||||
assertCurrent();
|
||||
waitForCurrent();
|
||||
|
||||
AddStep(@"make start current", () =>
|
||||
{
|
||||
@ -66,8 +66,9 @@ namespace osu.Game.Tests.Visual
|
||||
currentScreen = startScreen;
|
||||
});
|
||||
|
||||
assertCurrent();
|
||||
waitForCurrent();
|
||||
pushNext();
|
||||
waitForCurrent();
|
||||
AddAssert(@"only 2 items", () => breadcrumbs.Items.Count() == 2);
|
||||
AddStep(@"exit current", () => changedScreen.Exit());
|
||||
AddAssert(@"current screen is first", () => startScreen == changedScreen);
|
||||
@ -80,7 +81,7 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
|
||||
private void pushNext() => AddStep(@"push next screen", () => currentScreen = ((TestScreen)currentScreen).PushNext());
|
||||
private void assertCurrent() => AddAssert(@"changedScreen correct", () => currentScreen == changedScreen);
|
||||
private void waitForCurrent() => AddUntilStep(() => currentScreen.IsCurrentScreen, "current screen");
|
||||
|
||||
private abstract class TestScreen : OsuScreen
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user