Skip to content

Commit 0d82c1c

Browse files
committed
Add unsupported types
1 parent fbdefd3 commit 0d82c1c

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/ViewFactory.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ public static class ViewFactory
4646
// This is unstable when added directly as a view see https://github.com/gui-cs/Terminal.Gui/issues/3664
4747
typeof(Shortcut),
4848

49+
typeof(Tab),
50+
typeof(Bar),
51+
typeof(CharMap),
52+
typeof(LegendAnnotation),
53+
typeof(Menuv2),
54+
typeof(ScrollBar),
55+
typeof(ScrollSlider),
56+
typeof(TileView)
4957
];
5058

5159
/// <summary>
@@ -91,7 +99,7 @@ internal static MenuBarItem[] DefaultMenuBarItems
9199

92100
private static bool IsSupportedType( this Type t )
93101
{
94-
return t == typeof( Window ) || ( !KnownUnsupportedTypes.Any( t.IsSubclassOf ) & !KnownUnsupportedTypes.Contains( t ) );
102+
return t == typeof( Window ) ||!KnownUnsupportedTypes.Contains( t );
95103
}
96104

97105
/// <summary>

tests/ViewFactoryTests.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,6 @@ public void KnownUnsupportedTypes_ContainsExpectedItems( [ValueSource( nameof( K
154154
Assert.That( ViewFactory.KnownUnsupportedTypes, Contains.Item( expectedType ) );
155155
}
156156

157-
[Test]
158-
[Description( "Checks that no new types have been added that aren't tested" )]
159-
[Category( "Change Control" )]
160-
[NonParallelizable]
161-
public void KnownUnsupportedTypes_DoesNotContainUnexpectedItems( [ValueSource( nameof( ViewFactory_KnownUnsupportedTypes ) )] Type typeDeclaredUnsupportedInViewFactory )
162-
{
163-
Assert.That( KnownUnsupportedTypes_ExpectedTypes, Contains.Item( typeDeclaredUnsupportedInViewFactory ) );
164-
}
165-
166157
private bool CompareTwoViews( View nonGenericTabIndex, View genericTabIndex )
167158
{
168159
Assert.Warn( "View comparison only done by bounds check." );

0 commit comments

Comments
 (0)