-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Framework which provides a test runner with resources from the te…
…st project. And note that this runner only create if not open the visual test windows.
- Loading branch information
1 parent
537648a
commit c0fa63f
Showing
5 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) karaoke.dev <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Testing; | ||
|
||
namespace osu.Framework.Font.Tests.Visual; | ||
|
||
/// <summary> | ||
/// All the test scene with resource should inherit this class. | ||
/// </summary> | ||
public abstract partial class FrameworkTestScene : TestScene | ||
{ | ||
/// <summary> | ||
/// This runner will be created only if run the unit-test. | ||
/// </summary> | ||
/// <returns></returns> | ||
protected override ITestSceneTestRunner CreateRunner() => new FrameworkTestSceneTestRunner(); | ||
} |
18 changes: 18 additions & 0 deletions
18
osu.Framework.Font.Tests/Visual/FrameworkTestSceneTestRunner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) karaoke.dev <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.IO.Stores; | ||
using osu.Framework.Testing; | ||
|
||
namespace osu.Framework.Font.Tests.Visual; | ||
|
||
public partial class FrameworkTestSceneTestRunner : TestSceneTestRunner | ||
{ | ||
[BackgroundDependencyLoader] | ||
private void load() | ||
{ | ||
Resources.AddStore(new NamespacedResourceStore<byte[]>(new DllResourceStore(typeof(FrameworkTestSceneTestRunner).Assembly), "Resources")); | ||
Resources.AddStore(new NamespacedResourceStore<byte[]>(new ShaderResourceStore(), "Resources")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters