From 44a9aa529a734b0f1c7d95a8f26a09ed50a4193f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 21 Apr 2018 18:15:27 +0900 Subject: [PATCH] Test CI run with new changes --- osu-framework | 2 +- osu.Game/IO/Archives/ArchiveReader.cs | 3 +-- osu.Game/Skinning/LegacySkin.cs | 25 +++++++++++++++++++++++++ osu.Game/Tests/Visual/OsuTestCase.cs | 9 +-------- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/osu-framework b/osu-framework index 10597927c0..54bdeda01d 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 10597927c0eac1b1ea263598088ffc5b2f520953 +Subproject commit 54bdeda01dc9ec356037b63c002dbce282226e90 diff --git a/osu.Game/IO/Archives/ArchiveReader.cs b/osu.Game/IO/Archives/ArchiveReader.cs index d14080de5b..808ce159bb 100644 --- a/osu.Game/IO/Archives/ArchiveReader.cs +++ b/osu.Game/IO/Archives/ArchiveReader.cs @@ -1,14 +1,13 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; using System.IO; using osu.Framework.IO.Stores; namespace osu.Game.IO.Archives { - public abstract class ArchiveReader : IDisposable, IResourceStore + public abstract class ArchiveReader : IResourceStore { /// /// Opens a stream for reading a specific file from this archive. diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index 0a05137a87..45c6ec80aa 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -113,6 +113,31 @@ namespace osu.Game.Skinning string path = getPathForFile(name); return path == null ? null : underlyingStore.Get(path); } + + #region IDisposable Support + + private bool isDisposed; + + protected virtual void Dispose(bool disposing) + { + if (!isDisposed) + { + isDisposed = true; + } + } + + ~LegacySkinResourceStore() + { + Dispose(false); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + #endregion } } } diff --git a/osu.Game/Tests/Visual/OsuTestCase.cs b/osu.Game/Tests/Visual/OsuTestCase.cs index 02f425c296..1b01c9c95d 100644 --- a/osu.Game/Tests/Visual/OsuTestCase.cs +++ b/osu.Game/Tests/Visual/OsuTestCase.cs @@ -19,14 +19,7 @@ namespace osu.Game.Tests.Visual public OsuTestCaseTestRunner() { - runner = new TestCaseTestRunner.TestRunner(); - } - - protected override void LoadComplete() - { - base.LoadComplete(); - - Add(runner); + Add(runner = new TestCaseTestRunner.TestRunner()); } public void RunTestBlocking(TestCase test) => runner.RunTestBlocking(test);