Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the TestBrowser assembly dropdown #1274

Merged
merged 4 commits into from Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseAnimation.cs
Expand Up @@ -16,7 +16,7 @@ namespace osu.Framework.Tests.Visual
{
[TestFixture]
[System.ComponentModel.Description("frame-based animations")]
internal class TestCaseAnimation : TestCase
public class TestCaseAnimation : TestCase
{
public TestCaseAnimation()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseBlending.cs
Expand Up @@ -16,7 +16,7 @@

namespace osu.Framework.Tests.Visual
{
internal class TestCaseBlending : TestCase
public class TestCaseBlending : TestCase
{
private readonly Dropdown<BlendingMode> colourModeDropdown;
private readonly Dropdown<BlendingEquation> colourEquation;
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseBufferedContainer.cs
Expand Up @@ -9,7 +9,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseBufferedContainer : TestCaseMasking
public class TestCaseBufferedContainer : TestCaseMasking
{
private readonly BufferedContainer buffer;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseCheckboxes.cs
Expand Up @@ -11,7 +11,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseCheckboxes : TestCase
public class TestCaseCheckboxes : TestCase
{
public TestCaseCheckboxes()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseCircularContainer.cs
Expand Up @@ -10,7 +10,7 @@
namespace osu.Framework.Tests.Visual
{
[System.ComponentModel.Description(@"Checking for bugged corner radius")]
internal class TestCaseCircularContainer : TestCase
public class TestCaseCircularContainer : TestCase
{
private SingleUpdateCircularContainer container;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseCircularProgress.cs
Expand Up @@ -13,7 +13,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseCircularProgress : TestCase
public class TestCaseCircularProgress : TestCase
{
private readonly CircularProgress clock;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseContextMenu.cs
Expand Up @@ -14,7 +14,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseContextMenu : TestCase
public class TestCaseContextMenu : TestCase
{
private const int start_time = 0;
private const int duration = 1000;
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseDelayedLoad.cs
Expand Up @@ -14,7 +14,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseDelayedLoad : TestCase
public class TestCaseDelayedLoad : TestCase
{
private const int panel_count = 2048;

Expand Down
Expand Up @@ -12,7 +12,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseDrawSizePreservingFillContainer : TestCase
public class TestCaseDrawSizePreservingFillContainer : TestCase
{
public TestCaseDrawSizePreservingFillContainer()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseDropdownBox.cs
Expand Up @@ -14,7 +14,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseDropdownBox : TestCase
public class TestCaseDropdownBox : TestCase
{
private const int items_to_add = 10;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseEffects.cs
Expand Up @@ -16,7 +16,7 @@ namespace osu.Framework.Tests.Visual
{
[TestFixture]
[System.ComponentModel.Description("implementing the IEffect interface")]
internal class TestCaseEffects : TestCase
public class TestCaseEffects : TestCase
{
public TestCaseEffects()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseFillFlowContainer.cs
Expand Up @@ -20,7 +20,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseFillFlowContainer : TestCase
public class TestCaseFillFlowContainer : TestCase
{
private FillDirectionDropdown selectionDropdown;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseLocalisation.cs
Expand Up @@ -18,7 +18,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseLocalisation : TestCase
public class TestCaseLocalisation : TestCase
{
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
private readonly LocalisationEngine engine; //keep a reference to avoid GC of the engine
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseMasking.cs
Expand Up @@ -15,7 +15,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseMasking : TestCase
public class TestCaseMasking : TestCase
{
protected Container TestContainer;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseNestedHover.cs
Expand Up @@ -13,7 +13,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseNestedHover : TestCase
public class TestCaseNestedHover : TestCase
{
public TestCaseNestedHover()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseNestedMenus.cs
Expand Up @@ -19,7 +19,7 @@

namespace osu.Framework.Tests.Visual
{
internal class TestCaseNestedMenus : TestCase
public class TestCaseNestedMenus : TestCase
{
private const int max_depth = 5;
private const int max_count = 5;
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCasePropertyBoundaries.cs
Expand Up @@ -12,7 +12,7 @@ namespace osu.Framework.Tests.Visual
{
[TestFixture]
[System.ComponentModel.Description("ensure validity of drawables when receiving certain values")]
internal class TestCasePropertyBoundaries : TestCase
public class TestCasePropertyBoundaries : TestCase
{
[BackgroundDependencyLoader]
private void load()
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseRigidBody.cs
Expand Up @@ -15,7 +15,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseRigidBody : TestCase
public class TestCaseRigidBody : TestCase
{
private readonly TestRigidBodySimulation sim;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseScreen.cs
Expand Up @@ -17,7 +17,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseScreen : TestCase
public class TestCaseScreen : TestCase
{
public TestCaseScreen()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseScrollableFlow.cs
Expand Up @@ -14,7 +14,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseScrollableFlow : TestCase
public class TestCaseScrollableFlow : TestCase
{
private readonly ScheduledDelegate boxCreator;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseSearchContainer.cs
Expand Up @@ -14,7 +14,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseSearchContainer : TestCase
public class TestCaseSearchContainer : TestCase
{
public TestCaseSearchContainer()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseSizing.cs
Expand Up @@ -15,7 +15,7 @@ namespace osu.Framework.Tests.Visual
{
[TestFixture]
[System.ComponentModel.Description("potentially challenging size calculations")]
internal class TestCaseSizing : TestCase
public class TestCaseSizing : TestCase
{
private readonly Container testContainer;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseSpriteText.cs
Expand Up @@ -10,7 +10,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseSpriteText : TestCase
public class TestCaseSpriteText : TestCase
{
public TestCaseSpriteText()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseTabControl.cs
Expand Up @@ -18,7 +18,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseTabControl : TestCase
public class TestCaseTabControl : TestCase
{
public TestCaseTabControl()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseTextBox.cs
Expand Up @@ -11,7 +11,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseTextBox : TestCase
public class TestCaseTextBox : TestCase
{
public TestCaseTextBox()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseTextFlow.cs
Expand Up @@ -15,7 +15,7 @@ namespace osu.Framework.Tests.Visual
{
[TestFixture]
[System.ComponentModel.Description("word-wrap and paragraphs")]
internal class TestCaseTextFlow : TestCase
public class TestCaseTextFlow : TestCase
{
public TestCaseTextFlow()
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseTooltip.cs
Expand Up @@ -15,7 +15,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseTooltip : TestCase
public class TestCaseTooltip : TestCase
{
private readonly Container testContainer;

Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Tests/Visual/TestCaseTriangles.cs
Expand Up @@ -13,7 +13,7 @@
namespace osu.Framework.Tests.Visual
{
[TestFixture]
internal class TestCaseTriangles : TestCase
public class TestCaseTriangles : TestCase
{
private readonly Container testContainer;

Expand Down
7 changes: 5 additions & 2 deletions osu.Framework/Testing/TestBrowser.cs
Expand Up @@ -63,12 +63,15 @@ public TestBrowser(string assemblyNamespace = null)
assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(n => n.FullName.StartsWith("osu") || assemblyNamespace != null && n.FullName.StartsWith(assemblyNamespace)).ToList();

//we want to build the lists here because we're interested in the assembly we were *created* on.
foreach (Assembly asm in assemblies)
foreach (Assembly asm in assemblies.ToList())
{
var tests = asm.GetLoadableTypes().Where(t => t.IsSubclassOf(typeof(TestCase)) && !t.IsAbstract).ToList();
var tests = asm.GetLoadableTypes().Where(t => t.IsSubclassOf(typeof(TestCase)) && !t.IsAbstract && t.IsPublic).ToList();

if (!tests.Any())
{
assemblies.Remove(asm);
continue;
}

foreach (Type type in tests)
TestTypes.Add(type);
Expand Down