Skip to content

Commit 32b473d

Browse files
Enable 4 more libraries tests (#73214)
1 parent a85da7a commit 32b473d

File tree

10 files changed

+331
-25
lines changed

10 files changed

+331
-25
lines changed

src/libraries/System.Linq/tests/EnumerableDebugViewTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ namespace System.Linq.Tests
1414

1515
public class EnumerableDebugViewTests
1616
{
17-
[Fact]
17+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
1818
public void NonGenericEnumerableDebugView_ThrowsForNullSource()
1919
{
2020
Exception exc = Assert.Throws<TargetInvocationException>(() => CreateSystemCore_EnumerableDebugView(null));
2121
ArgumentNullException ane = Assert.IsType<ArgumentNullException>(exc.InnerException);
2222
Assert.Equal("enumerable", ane.ParamName);
2323
}
2424

25-
[Fact]
25+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
2626
public void NonGenericEnumerableDebugView_ThrowsForEmptySource()
2727
{
2828
IEnumerable source = Enumerable.Range(10, 0);
@@ -33,23 +33,23 @@ public void NonGenericEnumerableDebugView_ThrowsForEmptySource()
3333
Assert.False(string.IsNullOrEmpty(GetEmptyProperty(exc.InnerException)));
3434
}
3535

36-
[Fact]
36+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
3737
public void NonGenericEnumerableDebugView_NonEmptySource()
3838
{
3939
IEnumerable source = Enumerable.Range(10, 5).Select(i => (object)i);
4040
object debugView = CreateSystemCore_EnumerableDebugView(source);
4141
Assert.Equal<object>(source.Cast<object>().ToArray(), GetItems<object>(debugView));
4242
}
4343

44-
[Fact]
44+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
4545
public void GenericEnumerableDebugView_ThrowsForNullSource()
4646
{
4747
Exception exc = Assert.Throws<TargetInvocationException>(() => CreateSystemCore_EnumerableDebugView<int>(null));
4848
ArgumentNullException ane = Assert.IsType<ArgumentNullException>(exc.InnerException);
4949
Assert.Equal("enumerable", ane.ParamName);
5050
}
5151

52-
[Fact]
52+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
5353
public void GenericEnumerableDebugView_ThrowsForEmptySource()
5454
{
5555
IEnumerable<int> source = Enumerable.Range(10, 0);
@@ -60,7 +60,7 @@ public void GenericEnumerableDebugView_ThrowsForEmptySource()
6060
Assert.False(string.IsNullOrEmpty(GetEmptyProperty(exc.InnerException)));
6161
}
6262

63-
[Fact]
63+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
6464
public void GenericEnumerableDebugView_NonEmptySource()
6565
{
6666
IEnumerable<int> source = Enumerable.Range(10, 5);

src/libraries/System.Linq/tests/GroupByTests.DebuggerAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace System.Linq.Tests
1010
{
1111
public partial class GroupByTests : EnumerableTests
1212
{
13-
[Theory]
13+
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
1414
[MemberData(nameof(DebuggerAttributesValid_Data))]
1515
public void DebuggerAttributesValid<TKey, TElement>(IGrouping<TKey, TElement> grouping, string keyString)
1616
{

src/libraries/System.Linq/tests/GroupByTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ public void EmptyGroupingWithResultCount()
852852
Assert.Equal(0, Enumerable.Empty<int>().GroupBy(i => i, (x, y) => x + y.Count()).Count());
853853
}
854854

855-
[Fact]
855+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))]
856856
public static void GroupingKeyIsPublic()
857857
{
858858
// Grouping.Key needs to be public (not explicitly implemented) for the sake of WPF.

src/libraries/System.Linq/tests/System.Linq.Tests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
44
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
55
</PropertyGroup>
6+
<ItemGroup>
7+
<RdXmlFile Include="default.rd.xml" />
8+
</ItemGroup>
69
<ItemGroup>
710
<Compile Include="AggregateTests.cs" />
811
<Compile Include="AllTests.cs" />

src/libraries/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace System.Linq.Tests
1111
{
1212
public partial class ToLookupTests : EnumerableTests
1313
{
14-
[Theory]
14+
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
1515
[MemberData(nameof(DebuggerAttributesValid_Data))]
1616
public void DebuggerAttributesValid<TKey, TElement>(ILookup<TKey, TElement> lookup)
1717
{

0 commit comments

Comments
 (0)