From f8448b8b199cd779ba01349a70ff5be81c4b75f7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Aug 2017 15:37:31 +0900 Subject: [PATCH 1/6] Update to support new framework VisualTests structure --- osu-framework | 2 +- .../Beatmaps/TestWorkingBeatmap.cs | 2 +- .../Platform/TestStorage.cs | 2 +- osu.Desktop.Tests/Visual/OsuTestCase.cs | 34 ++++++++++ .../Visual}/TestCaseBeatSyncedContainer.cs | 27 ++++---- .../Visual}/TestCaseBeatmapDetailArea.cs | 9 +-- .../Visual}/TestCaseBeatmapDetails.cs | 9 ++- .../Visual}/TestCaseBeatmapOptionsOverlay.cs | 9 ++- .../Visual}/TestCaseBreadcrumbs.cs | 7 +- .../Visual}/TestCaseChatDisplay.cs | 5 +- .../Visual}/TestCaseContextMenu.cs | 9 ++- .../Visual}/TestCaseDialogOverlay.cs | 5 +- .../Visual}/TestCaseDirect.cs | 5 +- .../Visual}/TestCaseDrawableRoom.cs | 15 ++--- .../Visual}/TestCaseDrawings.cs | 5 +- .../Visual}/TestCaseGamefield.cs | 17 +++-- .../Visual}/TestCaseGraph.cs | 11 ++-- .../Visual}/TestCaseHitObjects.cs | 11 ++-- .../Visual}/TestCaseKeyCounter.cs | 17 +++-- .../Visual}/TestCaseLeaderboard.cs | 7 +- .../Visual}/TestCaseManiaHitObjects.cs | 7 +- .../Visual}/TestCaseManiaPlayfield.cs | 25 ++++--- .../Visual}/TestCaseMedalOverlay.cs | 5 +- .../Visual}/TestCaseMenuButtonSystem.cs | 7 +- .../Visual}/TestCaseMenuOverlays.cs | 5 +- .../Visual}/TestCaseMods.cs | 5 +- .../Visual}/TestCaseMusicController.cs | 5 +- .../Visual}/TestCaseNotificationOverlay.cs | 11 ++-- .../Visual}/TestCaseOnScreenDisplay.cs | 5 +- .../Visual}/TestCasePlaySongSelect.cs | 7 +- .../Visual}/TestCasePlayer.cs | 17 +++-- .../Visual}/TestCaseReplay.cs | 2 +- .../Visual}/TestCaseReplaySettingsOverlay.cs | 5 +- .../Visual}/TestCaseResults.cs | 5 +- .../Visual}/TestCaseRoomInspector.cs | 13 ++-- .../Visual}/TestCaseScoreCounter.cs | 7 +- .../Visual}/TestCaseScrollingHitObjects.cs | 9 ++- .../Visual}/TestCaseSettings.cs | 5 +- .../Visual}/TestCaseSkipButton.cs | 5 +- .../Visual}/TestCaseSocial.cs | 5 +- .../Visual}/TestCaseSongProgress.cs | 5 +- .../Visual}/TestCaseTabControl.cs | 7 +- .../Visual}/TestCaseTaikoHitObjects.cs | 9 ++- .../Visual}/TestCaseTaikoPlayfield.cs | 9 ++- .../Visual}/TestCaseTextAwesome.cs | 5 +- .../Visual}/TestCaseTwoLayerButton.cs | 5 +- .../Visual}/TestCaseUserPanel.cs | 7 +- .../Visual}/TestCaseUserProfile.cs | 5 +- osu.Desktop.Tests/VisualTests.cs | 22 ------- osu.Desktop.Tests/osu.Desktop.Tests.csproj | 66 +++++++++++++++++-- osu.Desktop.Tests/packages.config | 1 + .../AutomatedVisualTestGame.cs | 20 ------ osu.Desktop.VisualTests/Program.cs | 1 + osu.Desktop.VisualTests/VisualTestGame.cs | 2 +- .../osu.Desktop.VisualTests.csproj | 55 ++-------------- osu.Desktop/OsuTestBrowser.cs | 32 +++++++++ osu.Desktop/Program.cs | 12 +++- osu.Desktop/osu.Desktop.csproj | 23 +++++++ osu.sln | 33 ++++++++-- 59 files changed, 365 insertions(+), 317 deletions(-) rename {osu.Desktop.VisualTests => osu.Desktop.Tests}/Beatmaps/TestWorkingBeatmap.cs (91%) rename {osu.Desktop.VisualTests => osu.Desktop.Tests}/Platform/TestStorage.cs (92%) create mode 100644 osu.Desktop.Tests/Visual/OsuTestCase.cs rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseBeatSyncedContainer.cs (96%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseBeatmapDetailArea.cs (78%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseBeatmapDetails.cs (92%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseBeatmapOptionsOverlay.cs (86%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseBreadcrumbs.cs (86%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseChatDisplay.cs (77%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseContextMenu.cs (94%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseDialogOverlay.cs (92%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseDirect.cs (96%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseDrawableRoom.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseDrawings.cs (92%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseGamefield.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseGraph.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseHitObjects.cs (94%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseKeyCounter.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseLeaderboard.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseManiaHitObjects.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseManiaPlayfield.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseMedalOverlay.cs (82%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseMenuButtonSystem.cs (81%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseMenuOverlays.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseMods.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseMusicController.cs (88%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseNotificationOverlay.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseOnScreenDisplay.cs (88%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCasePlaySongSelect.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCasePlayer.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseReplay.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseReplaySettingsOverlay.cs (88%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseResults.cs (90%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseRoomInspector.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseScoreCounter.cs (93%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseScrollingHitObjects.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseSettings.cs (80%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseSkipButton.cs (75%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseSocial.cs (94%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseSongProgress.cs (91%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseTabControl.cs (88%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseTaikoHitObjects.cs (92%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseTaikoPlayfield.cs (95%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseTextAwesome.cs (88%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseTwoLayerButton.cs (72%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseUserPanel.cs (92%) rename {osu.Desktop.VisualTests/Tests => osu.Desktop.Tests/Visual}/TestCaseUserProfile.cs (92%) delete mode 100644 osu.Desktop.Tests/VisualTests.cs delete mode 100644 osu.Desktop.VisualTests/AutomatedVisualTestGame.cs create mode 100644 osu.Desktop/OsuTestBrowser.cs diff --git a/osu-framework b/osu-framework index 96daf2053a..e5beb4f01f 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 96daf2053a8a19fe221fef2557674ca5bee808fb +Subproject commit e5beb4f01fce0b46e87bc59d60398fedc1932737 diff --git a/osu.Desktop.VisualTests/Beatmaps/TestWorkingBeatmap.cs b/osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs similarity index 91% rename from osu.Desktop.VisualTests/Beatmaps/TestWorkingBeatmap.cs rename to osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs index b45574b761..084cfab309 100644 --- a/osu.Desktop.VisualTests/Beatmaps/TestWorkingBeatmap.cs +++ b/osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs @@ -5,7 +5,7 @@ using osu.Framework.Audio.Track; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; -namespace osu.Desktop.VisualTests.Beatmaps +namespace osu.Desktop.Tests.Beatmaps { public class TestWorkingBeatmap : WorkingBeatmap { diff --git a/osu.Desktop.VisualTests/Platform/TestStorage.cs b/osu.Desktop.Tests/Platform/TestStorage.cs similarity index 92% rename from osu.Desktop.VisualTests/Platform/TestStorage.cs rename to osu.Desktop.Tests/Platform/TestStorage.cs index f711ddac24..39e4d8049f 100644 --- a/osu.Desktop.VisualTests/Platform/TestStorage.cs +++ b/osu.Desktop.Tests/Platform/TestStorage.cs @@ -8,7 +8,7 @@ using SQLite.Net.Interop; using SQLite.Net.Platform.Generic; using SQLite.Net.Platform.Win32; -namespace osu.Desktop.VisualTests.Platform +namespace osu.Desktop.Tests.Platform { public class TestStorage : DesktopStorage { diff --git a/osu.Desktop.Tests/Visual/OsuTestCase.cs b/osu.Desktop.Tests/Visual/OsuTestCase.cs new file mode 100644 index 0000000000..6bd8187b45 --- /dev/null +++ b/osu.Desktop.Tests/Visual/OsuTestCase.cs @@ -0,0 +1,34 @@ +using NUnit.Framework; +using osu.Framework.Desktop.Platform; +using osu.Framework.Testing; +using osu.Game; + +namespace osu.Desktop.Tests.Visual +{ + [TestFixture] + public abstract class OsuTestCase : TestCase + { + [Test] + public override void RunTest() + { + using (var host = new HeadlessGameHost()) + host.Run(new OsuTestCaseTestRunner(this)); + } + + public class OsuTestCaseTestRunner : OsuGameBase + { + private readonly OsuTestCase testCase; + + public OsuTestCaseTestRunner(OsuTestCase testCase) + { + this.testCase = testCase; + } + + protected override void LoadComplete() + { + base.LoadComplete(); + Add(new TestCaseTestRunner.TestRunner(testCase)); + } + } + } +} diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs b/osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs similarity index 96% rename from osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs rename to osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs index 50d1df9964..130a034133 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs +++ b/osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs @@ -1,24 +1,23 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; -using osu.Framework.Graphics; -using osu.Framework.Timing; -using osu.Game.Overlays; -using osu.Framework.Graphics.Containers; -using osu.Game.Graphics.Containers; -using osu.Framework.Audio.Track; -using osu.Game.Beatmaps.ControlPoints; -using osu.Framework.Graphics.Shapes; -using OpenTK.Graphics; -using osu.Game.Graphics.Sprites; -using osu.Framework.Lists; using System; +using osu.Framework.Audio.Track; using osu.Framework.Extensions.Color4Extensions; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Lists; +using osu.Framework.Timing; +using osu.Game.Beatmaps.ControlPoints; +using osu.Game.Graphics.Containers; +using osu.Game.Graphics.Sprites; +using osu.Game.Overlays; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseBeatSyncedContainer : TestCase + internal class TestCaseBeatSyncedContainer : OsuTestCase { public override string Description => @"Tests beat synced containers."; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetailArea.cs b/osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs similarity index 78% rename from osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetailArea.cs rename to osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs index e0a503bc76..23b4ece4ec 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetailArea.cs +++ b/osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs @@ -1,14 +1,15 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; +using NUnit.Framework; using osu.Framework.Graphics; -using osu.Framework.Testing; using osu.Game.Screens.Select; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseBeatmapDetailArea : TestCase + [TestFixture] + internal class TestCaseBeatmapDetailArea : OsuTestCase { public override string Description => @"Beatmap details in song select"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs b/osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs rename to osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs index 111bc03377..11a15cf56f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs +++ b/osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs @@ -1,15 +1,14 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; -using osu.Framework.Testing; -using osu.Game.Screens.Select; using System.Linq; +using osu.Framework.Graphics; using osu.Game.Beatmaps; +using osu.Game.Screens.Select; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseBeatmapDetails : TestCase + internal class TestCaseBeatmapDetails : OsuTestCase { public override string Description => "BeatmapDetails tab of BeatmapDetailArea"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapOptionsOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs similarity index 86% rename from osu.Desktop.VisualTests/Tests/TestCaseBeatmapOptionsOverlay.cs rename to osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs index c9c1740856..3265f8ec76 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatmapOptionsOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs @@ -1,15 +1,14 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK.Graphics; -using OpenTK.Input; -using osu.Framework.Testing; using osu.Game.Graphics; using osu.Game.Screens.Select.Options; +using OpenTK.Graphics; +using OpenTK.Input; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseBeatmapOptionsOverlay : TestCase + internal class TestCaseBeatmapOptionsOverlay : OsuTestCase { public override string Description => @"Beatmap options in song select"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBreadcrumbs.cs b/osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs similarity index 86% rename from osu.Desktop.VisualTests/Tests/TestCaseBreadcrumbs.cs rename to osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs index f2dd454d65..10e0c784ab 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBreadcrumbs.cs +++ b/osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs @@ -1,13 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; -using osu.Game.Graphics.UserInterface; using osu.Framework.Graphics; +using osu.Game.Graphics.UserInterface; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseBreadcrumbs : TestCase + internal class TestCaseBreadcrumbs : OsuTestCase { public override string Description => @"breadcrumb > control"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs b/osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs similarity index 77% rename from osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs rename to osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs index 751b979bad..ae051a1e40 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs @@ -1,13 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Framework.Graphics.Containers; using osu.Game.Overlays; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseChatDisplay : TestCase + internal class TestCaseChatDisplay : OsuTestCase { public override string Description => @"Testing chat api and overlay"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseContextMenu.cs b/osu.Desktop.Tests/Visual/TestCaseContextMenu.cs similarity index 94% rename from osu.Desktop.VisualTests/Tests/TestCaseContextMenu.cs rename to osu.Desktop.Tests/Visual/TestCaseContextMenu.cs index 0b4e8a5799..f0894f794a 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseContextMenu.cs +++ b/osu.Desktop.Tests/Visual/TestCaseContextMenu.cs @@ -1,19 +1,18 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; -using OpenTK.Graphics; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; -using osu.Framework.Testing; using osu.Game.Graphics.UserInterface; +using OpenTK; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseContextMenu : TestCase + internal class TestCaseContextMenu : OsuTestCase { public override string Description => @"Menu visible on right click"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseDialogOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseDialogOverlay.cs rename to osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs index 6924817827..df15350453 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseDialogOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs @@ -1,14 +1,13 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Graphics; using osu.Game.Overlays; using osu.Game.Overlays.Dialog; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseDialogOverlay : TestCase + internal class TestCaseDialogOverlay : OsuTestCase { public override string Description => @"Display dialogs"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseDirect.cs b/osu.Desktop.Tests/Visual/TestCaseDirect.cs similarity index 96% rename from osu.Desktop.VisualTests/Tests/TestCaseDirect.cs rename to osu.Desktop.Tests/Visual/TestCaseDirect.cs index 4a5ff1b576..b78ea02767 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseDirect.cs +++ b/osu.Desktop.Tests/Visual/TestCaseDirect.cs @@ -3,14 +3,13 @@ using System.Collections.Generic; using osu.Framework.Allocation; -using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Overlays; using osu.Game.Rulesets; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - public class TestCaseDirect : TestCase + public class TestCaseDirect : OsuTestCase { public override string Description => @"osu!direct overlay"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs b/osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs rename to osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs index 38cf03d60e..04d551afe4 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseDrawableRoom.cs +++ b/osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs @@ -1,19 +1,18 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics; -using osu.Framework.Testing; -using osu.Game.Screens.Multiplayer; -using osu.Game.Online.Multiplayer; -using osu.Game.Users; using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; +using osu.Game.Online.Multiplayer; using osu.Game.Rulesets; +using osu.Game.Screens.Multiplayer; +using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseDrawableRoom : TestCase + internal class TestCaseDrawableRoom : OsuTestCase { public override string Description => @"Select your favourite room"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseDrawings.cs b/osu.Desktop.Tests/Visual/TestCaseDrawings.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseDrawings.cs rename to osu.Desktop.Tests/Visual/TestCaseDrawings.cs index 63ec06963c..81fd8cad03 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseDrawings.cs +++ b/osu.Desktop.Tests/Visual/TestCaseDrawings.cs @@ -2,13 +2,12 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Framework.Testing; using osu.Game.Screens.Tournament; using osu.Game.Screens.Tournament.Teams; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseDrawings : TestCase + internal class TestCaseDrawings : OsuTestCase { public override string Description => "Tournament drawings"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.Tests/Visual/TestCaseGamefield.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs rename to osu.Desktop.Tests/Visual/TestCaseGamefield.cs index 0b08065241..9d61c9ab0c 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.Tests/Visual/TestCaseGamefield.cs @@ -1,28 +1,27 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; +using System.Collections.Generic; +using osu.Desktop.Tests.Beatmaps; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; -using osu.Framework.Testing; using osu.Framework.Timing; using osu.Game.Beatmaps; +using osu.Game.Beatmaps.ControlPoints; +using osu.Game.Rulesets; using osu.Game.Rulesets.Catch.UI; using osu.Game.Rulesets.Mania.UI; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.UI; using osu.Game.Rulesets.Taiko.UI; -using System.Collections.Generic; -using osu.Desktop.VisualTests.Beatmaps; -using osu.Framework.Allocation; -using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Rulesets; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseGamefield : TestCase + internal class TestCaseGamefield : OsuTestCase { private RulesetStore rulesets; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs b/osu.Desktop.Tests/Visual/TestCaseGraph.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCaseGraph.cs rename to osu.Desktop.Tests/Visual/TestCaseGraph.cs index d969decaa5..13342d1ff1 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGraph.cs +++ b/osu.Desktop.Tests/Visual/TestCaseGraph.cs @@ -1,15 +1,14 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; -using osu.Framework.Graphics; -using osu.Framework.Testing; -using osu.Game.Graphics.UserInterface; using System.Linq; +using osu.Framework.Graphics; +using osu.Game.Graphics.UserInterface; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseGraph : TestCase + internal class TestCaseGraph : OsuTestCase { public override string Description => "graph"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.Tests/Visual/TestCaseHitObjects.cs similarity index 94% rename from osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs rename to osu.Desktop.Tests/Visual/TestCaseHitObjects.cs index 33841cae90..df5f9f65b8 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.Tests/Visual/TestCaseHitObjects.cs @@ -1,24 +1,23 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; -using OpenTK.Graphics; +using System.Collections.Generic; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; -using osu.Framework.Testing; using osu.Framework.Timing; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Osu.Judgements; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects.Drawables; -using System.Collections.Generic; +using OpenTK; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseHitObjects : TestCase + internal class TestCaseHitObjects : OsuTestCase { private readonly FramedClock framedClock; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs rename to osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs index f65dbe7a64..efb662d3b9 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseKeyCounter.cs +++ b/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs @@ -1,22 +1,21 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; -using osu.Framework.Graphics; -using OpenTK.Input; -using osu.Framework.Graphics.UserInterface; using osu.Framework.Configuration; +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using OpenTK; -using OpenTK.Graphics; -using osu.Framework.MathUtils; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Framework.MathUtils; using osu.Game.Screens.Play; +using OpenTK; +using OpenTK.Graphics; +using OpenTK.Input; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseKeyCounter : TestCase + internal class TestCaseKeyCounter : OsuTestCase { public override string Description => @"Tests key counter"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs b/osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs rename to osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs index 12d01ecc79..5f8ee8795c 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs +++ b/osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs @@ -1,18 +1,17 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; using osu.Framework.Graphics; -using osu.Framework.Testing; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.Mods; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Select.Leaderboards; using osu.Game.Users; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseLeaderboard : TestCase + internal class TestCaseLeaderboard : OsuTestCase { public override string Description => @"From song select"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs b/osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs rename to osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs index 30346e90c9..7dcc48c778 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseManiaHitObjects.cs +++ b/osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs @@ -3,15 +3,14 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Testing; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; -using OpenTK.Graphics; using OpenTK; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseManiaHitObjects : TestCase + internal class TestCaseManiaHitObjects : OsuTestCase { public TestCaseManiaHitObjects() { diff --git a/osu.Desktop.VisualTests/Tests/TestCaseManiaPlayfield.cs b/osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseManiaPlayfield.cs rename to osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs index adaae91815..ed0e5d81e9 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseManiaPlayfield.cs +++ b/osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs @@ -1,25 +1,24 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Input; -using osu.Framework.Testing; -using osu.Framework.Graphics; -using osu.Game.Rulesets.Mania.UI; using System; -using OpenTK; -using osu.Game.Rulesets.Mania.Objects.Drawables; -using osu.Game.Rulesets.Mania.Objects; -using osu.Framework.Configuration; -using OpenTK.Input; -using osu.Framework.Timing; -using osu.Framework.Extensions.IEnumerableExtensions; using System.Linq; +using osu.Framework.Configuration; +using osu.Framework.Extensions.IEnumerableExtensions; +using osu.Framework.Graphics; +using osu.Framework.Input; +using osu.Framework.Timing; +using osu.Game.Rulesets.Mania.Objects; +using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Timing; +using osu.Game.Rulesets.Mania.UI; using osu.Game.Rulesets.Timing; +using OpenTK; +using OpenTK.Input; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseManiaPlayfield : TestCase + internal class TestCaseManiaPlayfield : OsuTestCase { public override string Description => @"Mania playfield"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMedalOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs similarity index 82% rename from osu.Desktop.VisualTests/Tests/TestCaseMedalOverlay.cs rename to osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs index 1533f2141e..747f2190b0 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMedalOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs @@ -1,13 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseMedalOverlay : TestCase + internal class TestCaseMedalOverlay : OsuTestCase { public override string Description => @"medal get!"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs b/osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs similarity index 81% rename from osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs rename to osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs index ea2f0464c4..3c7ee343bb 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs +++ b/osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs @@ -1,15 +1,14 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Framework.Graphics.Colour; +using osu.Framework.Graphics.Shapes; using osu.Game.Screens.Menu; using OpenTK.Graphics; -using osu.Framework.Graphics.Shapes; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseMenuButtonSystem : TestCase + internal class TestCaseMenuButtonSystem : OsuTestCase { public override string Description => @"Main menu button system"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs b/osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs rename to osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs index 0187c0e629..1f4ad9d3da 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs +++ b/osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs @@ -3,12 +3,11 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Logging; -using osu.Framework.Testing; using osu.Game.Screens.Play; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseMenuOverlays : TestCase + internal class TestCaseMenuOverlays : OsuTestCase { public override string Description => @"Tests pause and fail overlays"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMods.cs b/osu.Desktop.Tests/Visual/TestCaseMods.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCaseMods.cs rename to osu.Desktop.Tests/Visual/TestCaseMods.cs index 1604be603a..f48030067d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMods.cs +++ b/osu.Desktop.Tests/Visual/TestCaseMods.cs @@ -4,14 +4,13 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Overlays.Mods; -using osu.Framework.Testing; using osu.Game.Rulesets; using osu.Game.Screens.Play.HUD; using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseMods : TestCase + internal class TestCaseMods : OsuTestCase { public override string Description => @"Mod select overlay and in-game display"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs b/osu.Desktop.Tests/Visual/TestCaseMusicController.cs similarity index 88% rename from osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs rename to osu.Desktop.Tests/Visual/TestCaseMusicController.cs index 292e31de75..8d71527a21 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs +++ b/osu.Desktop.Tests/Visual/TestCaseMusicController.cs @@ -5,15 +5,14 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Testing; using osu.Framework.Timing; using osu.Game; using osu.Game.Beatmaps; using osu.Game.Overlays; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseMusicController : TestCase + internal class TestCaseMusicController : OsuTestCase { public override string Description => @"Tests music controller ui."; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseNotificationOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCaseNotificationOverlay.cs rename to osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs index 3b9c251670..b9e492593f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseNotificationOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs @@ -2,17 +2,18 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; using osu.Framework.Graphics; -using osu.Framework.Testing; +using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; using osu.Game.Overlays; -using System.Linq; using osu.Game.Overlays.Notifications; -using osu.Framework.Graphics.Containers; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseNotificationOverlay : TestCase + [TestFixture] + internal class TestCaseNotificationOverlay : OsuTestCase { public override string Description => @"I handle notifications"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseOnScreenDisplay.cs b/osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs similarity index 88% rename from osu.Desktop.VisualTests/Tests/TestCaseOnScreenDisplay.cs rename to osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs index f2b4ed7918..0b7a822e1d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseOnScreenDisplay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs @@ -3,12 +3,11 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; -using osu.Framework.Testing; using osu.Game.Overlays; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseOnScreenDisplay : TestCase + internal class TestCaseOnScreenDisplay : OsuTestCase { private FrameworkConfigManager config; private Bindable frameSyncMode; diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs rename to osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs index 51c78ff442..379100b543 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs @@ -2,8 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Desktop.VisualTests.Platform; -using osu.Framework.Testing; +using osu.Desktop.Tests.Platform; using osu.Framework.MathUtils; using osu.Game.Beatmaps; using osu.Game.Database; @@ -11,9 +10,9 @@ using osu.Game.Rulesets; using osu.Game.Screens.Select; using osu.Game.Screens.Select.Filter; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCasePlaySongSelect : TestCase + internal class TestCasePlaySongSelect : OsuTestCase { private readonly BeatmapManager manager; diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.Tests/Visual/TestCasePlayer.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCasePlayer.cs rename to osu.Desktop.Tests/Visual/TestCasePlayer.cs index f38cabd618..f5d02d3f2b 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.Tests/Visual/TestCasePlayer.cs @@ -2,22 +2,21 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using osu.Desktop.Tests.Beatmaps; using osu.Framework.Allocation; -using osu.Framework.Testing; +using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps; -using OpenTK; +using osu.Game.Rulesets; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Osu.Objects; -using osu.Game.Screens.Play; -using OpenTK.Graphics; -using osu.Desktop.VisualTests.Beatmaps; using osu.Game.Rulesets.Osu.UI; -using osu.Framework.Graphics.Shapes; -using osu.Game.Rulesets; +using osu.Game.Screens.Play; +using OpenTK; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCasePlayer : TestCase + internal class TestCasePlayer : OsuTestCase { protected Player Player; private RulesetStore rulesets; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseReplay.cs b/osu.Desktop.Tests/Visual/TestCaseReplay.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCaseReplay.cs rename to osu.Desktop.Tests/Visual/TestCaseReplay.cs index e00a912278..9b2f59e444 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseReplay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseReplay.cs @@ -6,7 +6,7 @@ using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.Mods; using osu.Game.Screens.Play; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { internal class TestCaseReplay : TestCasePlayer { diff --git a/osu.Desktop.VisualTests/Tests/TestCaseReplaySettingsOverlay.cs b/osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs similarity index 88% rename from osu.Desktop.VisualTests/Tests/TestCaseReplaySettingsOverlay.cs rename to osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs index 00a9774067..ab865dcab0 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseReplaySettingsOverlay.cs +++ b/osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs @@ -2,14 +2,13 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; -using osu.Framework.Testing; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Play; using osu.Game.Screens.Play.ReplaySettings; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseReplaySettingsOverlay : TestCase + internal class TestCaseReplaySettingsOverlay : OsuTestCase { public override string Description => @"Settings visible in replay/auto"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseResults.cs b/osu.Desktop.Tests/Visual/TestCaseResults.cs similarity index 90% rename from osu.Desktop.VisualTests/Tests/TestCaseResults.cs rename to osu.Desktop.Tests/Visual/TestCaseResults.cs index 288fff346f..a0622b302a 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseResults.cs +++ b/osu.Desktop.Tests/Visual/TestCaseResults.cs @@ -4,15 +4,14 @@ using System; using System.Collections.Generic; using osu.Framework.Allocation; -using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Ranking; using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseResults : TestCase + internal class TestCaseResults : OsuTestCase { private BeatmapManager beatmaps; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseRoomInspector.cs b/osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseRoomInspector.cs rename to osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs index 043f072b25..db557baed2 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseRoomInspector.cs +++ b/osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs @@ -1,18 +1,17 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; -using osu.Framework.Graphics; -using osu.Game.Screens.Multiplayer; -using osu.Game.Online.Multiplayer; -using osu.Game.Users; using osu.Framework.Allocation; +using osu.Framework.Graphics; using osu.Game.Beatmaps; +using osu.Game.Online.Multiplayer; using osu.Game.Rulesets; +using osu.Game.Screens.Multiplayer; +using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseRoomInspector : TestCase + internal class TestCaseRoomInspector : OsuTestCase { public override string Description => @"from the multiplayer lobby"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs similarity index 93% rename from osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs rename to osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs index fc29e8481e..ac96deb209 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs @@ -1,17 +1,16 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.MathUtils; -using osu.Framework.Testing; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Play.HUD; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseScoreCounter : TestCase + internal class TestCaseScoreCounter : OsuTestCase { public override string Description => @"Tests multiple counters"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs b/osu.Desktop.Tests/Visual/TestCaseScrollingHitObjects.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs rename to osu.Desktop.Tests/Visual/TestCaseScrollingHitObjects.cs index 43f30a96b0..efc129a678 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScrollingHitObjects.cs +++ b/osu.Desktop.Tests/Visual/TestCaseScrollingHitObjects.cs @@ -1,23 +1,22 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; -using OpenTK.Graphics; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; -using osu.Framework.Testing; using osu.Game.Graphics.Sprites; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Timing; +using OpenTK; +using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - public class TestCaseScrollingHitObjects : TestCase + public class TestCaseScrollingHitObjects : OsuTestCase { public override string Description => "SpeedAdjustmentContainer/DrawableTimingSection"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseSettings.cs b/osu.Desktop.Tests/Visual/TestCaseSettings.cs similarity index 80% rename from osu.Desktop.VisualTests/Tests/TestCaseSettings.cs rename to osu.Desktop.Tests/Visual/TestCaseSettings.cs index 3d21f0e3b1..7b35009aef 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseSettings.cs +++ b/osu.Desktop.Tests/Visual/TestCaseSettings.cs @@ -1,12 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Overlays; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseSettings : TestCase + internal class TestCaseSettings : OsuTestCase { public override string Description => @"Tests the settings overlay"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseSkipButton.cs b/osu.Desktop.Tests/Visual/TestCaseSkipButton.cs similarity index 75% rename from osu.Desktop.VisualTests/Tests/TestCaseSkipButton.cs rename to osu.Desktop.Tests/Visual/TestCaseSkipButton.cs index 1f81226a8e..0e73314850 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseSkipButton.cs +++ b/osu.Desktop.Tests/Visual/TestCaseSkipButton.cs @@ -1,12 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Screens.Play; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseSkipButton : TestCase + internal class TestCaseSkipButton : OsuTestCase { public override string Description => @"Skip skip skippediskip"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseSocial.cs b/osu.Desktop.Tests/Visual/TestCaseSocial.cs similarity index 94% rename from osu.Desktop.VisualTests/Tests/TestCaseSocial.cs rename to osu.Desktop.Tests/Visual/TestCaseSocial.cs index 34209119bd..da60c82cea 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseSocial.cs +++ b/osu.Desktop.Tests/Visual/TestCaseSocial.cs @@ -1,13 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - public class TestCaseSocial : TestCase + public class TestCaseSocial : OsuTestCase { public override string Description => @"social browser overlay"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseSongProgress.cs b/osu.Desktop.Tests/Visual/TestCaseSongProgress.cs similarity index 91% rename from osu.Desktop.VisualTests/Tests/TestCaseSongProgress.cs rename to osu.Desktop.Tests/Visual/TestCaseSongProgress.cs index 3368224be1..fceb773ae6 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseSongProgress.cs +++ b/osu.Desktop.Tests/Visual/TestCaseSongProgress.cs @@ -4,14 +4,13 @@ using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.MathUtils; -using osu.Framework.Testing; using osu.Framework.Timing; using osu.Game.Rulesets.Objects; using osu.Game.Screens.Play; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseSongProgress : TestCase + internal class TestCaseSongProgress : OsuTestCase { public override string Description => @"With fake data"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs b/osu.Desktop.Tests/Visual/TestCaseTabControl.cs similarity index 88% rename from osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs rename to osu.Desktop.Tests/Visual/TestCaseTabControl.cs index c0c01a6daa..4bdea2615d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs +++ b/osu.Desktop.Tests/Visual/TestCaseTabControl.cs @@ -2,15 +2,14 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; -using OpenTK; -using osu.Framework.Testing; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Select.Filter; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - public class TestCaseTabControl : TestCase + public class TestCaseTabControl : OsuTestCase { public override string Description => @"Filter for song select"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs b/osu.Desktop.Tests/Visual/TestCaseTaikoHitObjects.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs rename to osu.Desktop.Tests/Visual/TestCaseTaikoHitObjects.cs index d98e39ae7b..565c8f64c1 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoHitObjects.cs +++ b/osu.Desktop.Tests/Visual/TestCaseTaikoHitObjects.cs @@ -2,15 +2,14 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Linq; +using osu.Framework.Graphics.Containers; +using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces; using OpenTK; using OpenTK.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Testing; -using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseTaikoHitObjects : TestCase + internal class TestCaseTaikoHitObjects : OsuTestCase { public override string Description => "Taiko hit objects"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.Tests/Visual/TestCaseTaikoPlayfield.cs similarity index 95% rename from osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs rename to osu.Desktop.Tests/Visual/TestCaseTaikoPlayfield.cs index 8ca129eb91..903d91389d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.Tests/Visual/TestCaseTaikoPlayfield.cs @@ -1,22 +1,21 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; +using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; -using osu.Framework.Testing; using osu.Framework.Timing; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Taiko.Judgements; using osu.Game.Rulesets.Taiko.Objects; using osu.Game.Rulesets.Taiko.Objects.Drawables; using osu.Game.Rulesets.Taiko.UI; -using System; +using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseTaikoPlayfield : TestCase + internal class TestCaseTaikoPlayfield : OsuTestCase { private const double default_duration = 300; private const float scroll_time = 1000; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs b/osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs similarity index 88% rename from osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs rename to osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs index 504b59f007..b98c0f700d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTextAwesome.cs +++ b/osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs @@ -2,7 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using osu.Framework.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.MathUtils; @@ -10,9 +9,9 @@ using osu.Game.Graphics; using OpenTK; using OpenTK.Graphics; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseTextAwesome : TestCase + internal class TestCaseTextAwesome : OsuTestCase { public override string Description => @"Tests display of icons"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTwoLayerButton.cs b/osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs similarity index 72% rename from osu.Desktop.VisualTests/Tests/TestCaseTwoLayerButton.cs rename to osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs index 0c35a4b8aa..ac641d75a2 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTwoLayerButton.cs +++ b/osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs @@ -1,12 +1,11 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Game.Graphics.UserInterface; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseTwoLayerButton : TestCase + internal class TestCaseTwoLayerButton : OsuTestCase { public override string Description => @"Mostly back button"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseUserPanel.cs b/osu.Desktop.Tests/Visual/TestCaseUserPanel.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseUserPanel.cs rename to osu.Desktop.Tests/Visual/TestCaseUserPanel.cs index 22cdf42f7d..b42fd3136d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseUserPanel.cs +++ b/osu.Desktop.Tests/Visual/TestCaseUserPanel.cs @@ -1,15 +1,14 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Testing; using osu.Framework.Graphics; -using osu.Game.Users; using osu.Framework.Graphics.Containers; +using osu.Game.Users; using OpenTK; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseUserPanel : TestCase + internal class TestCaseUserPanel : OsuTestCase { public override string Description => @"Panels for displaying a user's status"; diff --git a/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs b/osu.Desktop.Tests/Visual/TestCaseUserProfile.cs similarity index 92% rename from osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs rename to osu.Desktop.Tests/Visual/TestCaseUserProfile.cs index d7a2c8e47d..e5955441dc 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs +++ b/osu.Desktop.Tests/Visual/TestCaseUserProfile.cs @@ -3,13 +3,12 @@ using System; using System.Linq; -using osu.Framework.Testing; using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.VisualTests.Tests +namespace osu.Desktop.Tests.Visual { - internal class TestCaseUserProfile : TestCase + internal class TestCaseUserProfile : OsuTestCase { public override string Description => "Tests user's profile page."; diff --git a/osu.Desktop.Tests/VisualTests.cs b/osu.Desktop.Tests/VisualTests.cs deleted file mode 100644 index 6ef924e873..0000000000 --- a/osu.Desktop.Tests/VisualTests.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using NUnit.Framework; -using osu.Desktop.VisualTests; -using osu.Framework.Desktop.Platform; - -namespace osu.Desktop.Tests -{ - [TestFixture] - public class VisualTests - { - [Test] - public void TestVisualTests() - { - using (var host = new HeadlessGameHost()) - { - host.Run(new AutomatedVisualTestGame()); - } - } - } -} diff --git a/osu.Desktop.Tests/osu.Desktop.Tests.csproj b/osu.Desktop.Tests/osu.Desktop.Tests.csproj index f940e4be9e..5058d2eed5 100644 --- a/osu.Desktop.Tests/osu.Desktop.Tests.csproj +++ b/osu.Desktop.Tests/osu.Desktop.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -41,6 +41,10 @@ $(SolutionDir)\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll True + + $(SolutionDir)\packages\ppy.OpenTK.3.0\lib\net45\OpenTK.dll + True + False $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll @@ -55,15 +59,67 @@ $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {65DC628F-A640-4111-AB35-3A5652BC1E17} osu.Framework.Desktop + + {007b2356-ab6f-4bd9-96d5-116fc2dce69a} + osu.Framework.Testing + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} osu.Framework @@ -72,10 +128,6 @@ {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} osu.Game.Resources - - {69051C69-12AE-4E7D-A3E6-460D2E282312} - osu.Desktop.VisualTests - {58F6C80C-1253-4A0E-A465-B8C85EBEADF3} osu.Game.Rulesets.Catch @@ -118,4 +170,4 @@ --> - \ No newline at end of file + diff --git a/osu.Desktop.Tests/packages.config b/osu.Desktop.Tests/packages.config index 7bd35a3abe..ed487e5cd5 100644 --- a/osu.Desktop.Tests/packages.config +++ b/osu.Desktop.Tests/packages.config @@ -6,6 +6,7 @@ Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/maste + diff --git a/osu.Desktop.VisualTests/AutomatedVisualTestGame.cs b/osu.Desktop.VisualTests/AutomatedVisualTestGame.cs deleted file mode 100644 index b08588b29c..0000000000 --- a/osu.Desktop.VisualTests/AutomatedVisualTestGame.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Testing; -using osu.Game; - -namespace osu.Desktop.VisualTests -{ - public class AutomatedVisualTestGame : OsuGameBase - { - protected override void LoadComplete() - { - base.LoadComplete(); - - // Have to construct this here, rather than in the constructor, because - // we depend on some dependencies to be loaded within OsuGameBase.load(). - Add(new TestRunner(new TestBrowser())); - } - } -} \ No newline at end of file diff --git a/osu.Desktop.VisualTests/Program.cs b/osu.Desktop.VisualTests/Program.cs index 03d1588b78..62465c69d2 100644 --- a/osu.Desktop.VisualTests/Program.cs +++ b/osu.Desktop.VisualTests/Program.cs @@ -4,6 +4,7 @@ using System; using osu.Framework.Desktop; using osu.Framework.Platform; +using osu.Framework.VisualTests; namespace osu.Desktop.VisualTests { diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs index 5c5bcd9e21..7655f6a59d 100644 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ b/osu.Desktop.VisualTests/VisualTestGame.cs @@ -2,7 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Platform; -using osu.Framework.Testing; +using osu.Framework.VisualTests; using osu.Game; using osu.Game.Screens.Backgrounds; diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj index 1f4fd80ca6..bfbd8993f6 100644 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj @@ -1,4 +1,4 @@ - + {69051C69-12AE-4E7D-A3E6-460D2E282312} @@ -155,6 +155,10 @@ {007b2356-ab6f-4bd9-96d5-116fc2dce69a} osu.Framework.Testing + + {1f02f11c-2c66-4d25-bbb5-5c752aad3e62} + osu.Framework.VisualTestBrowser + {c76bf5b3-985e-4d39-95fe-97c9c879b83a} osu.Framework @@ -185,55 +189,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -258,4 +215,4 @@ - \ No newline at end of file + diff --git a/osu.Desktop/OsuTestBrowser.cs b/osu.Desktop/OsuTestBrowser.cs new file mode 100644 index 0000000000..d2beefc654 --- /dev/null +++ b/osu.Desktop/OsuTestBrowser.cs @@ -0,0 +1,32 @@ +using osu.Framework.Platform; +using osu.Framework.Testing; +using osu.Game; +using osu.Game.Screens.Backgrounds; + +namespace osu.Desktop +{ + internal class OsuTestBrowser : OsuGameBase + { + protected override void LoadComplete() + { + base.LoadComplete(); + + LoadComponentAsync(new BackgroundScreenDefault { Depth = 10 }, AddInternal); + + // Have to construct this here, rather than in the constructor, because + // we depend on some dependencies to be loaded within OsuGameBase.load(). + Add(new TestBrowser()); + } + + public override void SetHost(GameHost host) + { + base.SetHost(host); + + host.UpdateThread.InactiveHz = host.UpdateThread.ActiveHz; + host.DrawThread.InactiveHz = host.DrawThread.ActiveHz; + host.InputThread.InactiveHz = host.InputThread.ActiveHz; + + host.Window.CursorState |= CursorState.Hidden; + } + } +} \ No newline at end of file diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index 3b63239525..0ef458924a 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using System.Linq; using osu.Framework.Desktop; using osu.Framework.Desktop.Platform; using osu.Game.IPC; @@ -33,7 +34,16 @@ namespace osu.Desktop } else { - host.Run(new OsuGameDesktop(args)); + switch (args.First() ?? string.Empty) + { + case "--tests": + host.Run(new OsuTestBrowser()); + break; + default: + host.Run(new OsuGameDesktop(args)); + break; + } + } return 0; } diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index 82fbefec7a..a85add0ecb 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -90,6 +90,20 @@ Properties\app.manifest + + true + bin\VisualTests\ + DEBUG + true + 0 + true + full + AnyCPU + false + 6 + prompt + AllRules.ruleset + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll @@ -195,6 +209,10 @@ {65dc628f-a640-4111-ab35-3a5652bc1e17} osu.Framework.Desktop + + {007B2356-AB6F-4BD9-96D5-116FC2DCE69A} + osu.Framework.Testing + {c76bf5b3-985e-4d39-95fe-97c9c879b83a} osu.Framework @@ -203,6 +221,10 @@ {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} osu.Game.Resources + + {230ac4f3-7783-49fb-9aec-b83cda3b9f3d} + osu.Desktop.Tests + {c92a607b-1fdd-4954-9f92-03ff547d9080} osu.Game.Rulesets.Osu @@ -226,6 +248,7 @@ + diff --git a/osu.sln b/osu.sln index 317cfe7da4..3799c890b9 100644 --- a/osu.sln +++ b/osu.sln @@ -17,8 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Framework", "Framework", "{ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework.Desktop", "osu-framework\osu.Framework.Desktop\osu.Framework.Desktop.csproj", "{65DC628F-A640-4111-AB35-3A5652BC1E17}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.VisualTests", "osu.Desktop.VisualTests\osu.Desktop.VisualTests.csproj", "{69051C69-12AE-4E7D-A3E6-460D2E282312}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Tests", "osu.Game.Tests\osu.Game.Tests.csproj", "{54377672-20B1-40AF-8087-5CF73BF3953A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Rulesets.Osu", "osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj", "{C92A607B-1FDD-4954-9F92-03FF547D9080}" @@ -43,62 +41,84 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU + VisualTests|Any CPU = VisualTests|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.Release|Any CPU.Build.0 = Release|Any CPU + {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.VisualTests|Any CPU.ActiveCfg = VisualTests|Any CPU + {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}.VisualTests|Any CPU.Build.0 = VisualTests|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Debug|Any CPU.Build.0 = Debug|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Release|Any CPU.ActiveCfg = Release|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Release|Any CPU.Build.0 = Release|Any CPU + {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.Build.0 = Release|Any CPU + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.Build.0 = Release|Any CPU + {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.Build.0 = Debug|Any CPU {65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.ActiveCfg = Release|Any CPU {65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.Build.0 = Release|Any CPU - {69051C69-12AE-4E7D-A3E6-460D2E282312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69051C69-12AE-4E7D-A3E6-460D2E282312}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69051C69-12AE-4E7D-A3E6-460D2E282312}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69051C69-12AE-4E7D-A3E6-460D2E282312}.Release|Any CPU.Build.0 = Release|Any CPU + {65DC628F-A640-4111-AB35-3A5652BC1E17}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {65DC628F-A640-4111-AB35-3A5652BC1E17}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Debug|Any CPU.Build.0 = Debug|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Release|Any CPU.ActiveCfg = Release|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Release|Any CPU.Build.0 = Release|Any CPU + {54377672-20B1-40AF-8087-5CF73BF3953A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {54377672-20B1-40AF-8087-5CF73BF3953A}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {C92A607B-1FDD-4954-9F92-03FF547D9080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C92A607B-1FDD-4954-9F92-03FF547D9080}.Debug|Any CPU.Build.0 = Debug|Any CPU {C92A607B-1FDD-4954-9F92-03FF547D9080}.Release|Any CPU.ActiveCfg = Release|Any CPU {C92A607B-1FDD-4954-9F92-03FF547D9080}.Release|Any CPU.Build.0 = Release|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Debug|Any CPU.Build.0 = Debug|Any CPU {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Release|Any CPU.ActiveCfg = Release|Any CPU {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Release|Any CPU.Build.0 = Release|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {F167E17A-7DE6-4AF5-B920-A5112296C695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F167E17A-7DE6-4AF5-B920-A5112296C695}.Debug|Any CPU.Build.0 = Debug|Any CPU {F167E17A-7DE6-4AF5-B920-A5112296C695}.Release|Any CPU.ActiveCfg = Release|Any CPU {F167E17A-7DE6-4AF5-B920-A5112296C695}.Release|Any CPU.Build.0 = Release|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.Debug|Any CPU.Build.0 = Debug|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.Release|Any CPU.ActiveCfg = Release|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.Release|Any CPU.Build.0 = Release|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.Build.0 = Release|Any CPU + {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Debug|Any CPU.Build.0 = Debug|Any CPU {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Release|Any CPU.ActiveCfg = Release|Any CPU {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Release|Any CPU.Build.0 = Release|Any CPU + {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU + {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.VisualTests|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -109,7 +129,6 @@ Global {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} {65DC628F-A640-4111-AB35-3A5652BC1E17} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC} - {69051C69-12AE-4E7D-A3E6-460D2E282312} = {80683232-505E-41EA-A37C-2CFCF1C88C57} {54377672-20B1-40AF-8087-5CF73BF3953A} = {80683232-505E-41EA-A37C-2CFCF1C88C57} {C92A607B-1FDD-4954-9F92-03FF547D9080} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} {58F6C80C-1253-4A0E-A465-B8C85EBEADF3} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} From e6ef50c4e464a14c93f96424e7b4aabdcd43cf75 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Aug 2017 15:40:28 +0900 Subject: [PATCH 2/6] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index e5beb4f01f..9ae8979ef7 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit e5beb4f01fce0b46e87bc59d60398fedc1932737 +Subproject commit 9ae8979ef7ef0968c90cdbce40a04969d43633c7 From 104c25266d61b0cc0f840a8b4e6552afa3b47dc9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Aug 2017 15:48:42 +0900 Subject: [PATCH 3/6] Add missing licence headers --- osu.Desktop.Tests/Visual/OsuTestCase.cs | 5 ++++- osu.Desktop/OsuTestBrowser.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Desktop.Tests/Visual/OsuTestCase.cs b/osu.Desktop.Tests/Visual/OsuTestCase.cs index 6bd8187b45..e54f7dbeb5 100644 --- a/osu.Desktop.Tests/Visual/OsuTestCase.cs +++ b/osu.Desktop.Tests/Visual/OsuTestCase.cs @@ -1,4 +1,7 @@ -using NUnit.Framework; +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using NUnit.Framework; using osu.Framework.Desktop.Platform; using osu.Framework.Testing; using osu.Game; diff --git a/osu.Desktop/OsuTestBrowser.cs b/osu.Desktop/OsuTestBrowser.cs index d2beefc654..50af9bd317 100644 --- a/osu.Desktop/OsuTestBrowser.cs +++ b/osu.Desktop/OsuTestBrowser.cs @@ -1,4 +1,7 @@ -using osu.Framework.Platform; +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Framework.Platform; using osu.Framework.Testing; using osu.Game; using osu.Game.Screens.Backgrounds; From 7e89b1021df0b2ffbd7717d3926379b298ff9d80 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Aug 2017 15:58:59 +0900 Subject: [PATCH 4/6] FirstOrDefault --- osu.Desktop/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index 0ef458924a..1fab92e020 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -34,7 +34,7 @@ namespace osu.Desktop } else { - switch (args.First() ?? string.Empty) + switch (args.FirstOrDefault() ?? string.Empty) { case "--tests": host.Run(new OsuTestBrowser()); From fc97fdb8c1887f67c9289421c088afd0f2c2586a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Aug 2017 16:07:25 +0900 Subject: [PATCH 5/6] Use a common build directory between both build ccnfigurations There's no need to build to VisualTests when they share everything --- osu.Desktop/osu.Desktop.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index a85add0ecb..8ffa6b62f7 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -92,7 +92,7 @@ true - bin\VisualTests\ + bin\Debug\ DEBUG true 0 From 17900f33539a0d0791372eba9ad4c71a771e607f Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 4 Aug 2017 17:15:09 +0930 Subject: [PATCH 6/6] Update VSCode with new configurations. --- .vscode/launch.json | 24 ++++++------------------ .vscode/tasks.json | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b3b86da42f..f1083179b8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,22 @@ { "version": "0.2.0", - "configurations": [ - { - "name": "VisualTests (debug)", + "configurations": [{ + "name": "osu! (VisualTests)", "windows": { "type": "clr" }, "type": "mono", "request": "launch", - "program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Debug/osu!.exe", + "program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe", + "args": [ + "--tests" + ], "cwd": "${workspaceRoot}", "preLaunchTask": "Build (Debug)", "runtimeExecutable": null, "env": {}, "console": "internalConsole" }, - { - "name": "VisualTests (release)", - "windows": { - "type": "clr" - }, - "type": "mono", - "request": "launch", - "program": "${workspaceRoot}/osu.Desktop.VisualTests/bin/Release/osu!.exe", - "cwd": "${workspaceRoot}", - "preLaunchTask": "Build (Release)", - "runtimeExecutable": null, - "env": {}, - "console": "internalConsole" - }, { "name": "osu! (debug)", "windows": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b0fd5fbb0d..3db43ca9bb 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,35 +2,41 @@ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", - "problemMatcher": "$msCompile", - "isShellCommand": true, "command": "msbuild", + "type": "shell", "suppressTaskName": true, - "showOutput": "silent", "args": [ "/property:GenerateFullPaths=true", "/property:DebugType=portable", + "/verbosity:minimal", "/m" //parallel compiling support. ], - "tasks": [ - { + "tasks": [{ "taskName": "Build (Debug)", - "isBuildCommand": true + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$msCompile" + ] }, { "taskName": "Build (Release)", "args": [ "/property:Configuration=Release" + ], + "problemMatcher": [ + "$msCompile" ] }, - { - "taskName": "Clean All", - "dependsOn": ["Clean (Debug)", "Clean (Release)"] - }, { "taskName": "Clean (Debug)", "args": [ "/target:Clean" + ], + "problemMatcher": [ + "$msCompile" ] }, { @@ -38,6 +44,19 @@ "args": [ "/target:Clean", "/property:Configuration=Release" + ], + "problemMatcher": [ + "$msCompile" + ] + }, + { + "taskName": "Clean All", + "dependsOn": [ + "Clean (Debug)", + "Clean (Release)" + ], + "problemMatcher": [ + "$msCompile" ] } ]