Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/libraries/System.Linq/tests/EnumerableDebugViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ namespace System.Linq.Tests

public class EnumerableDebugViewTests
{
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public void NonGenericEnumerableDebugView_ThrowsForNullSource()
{
Exception exc = Assert.Throws<TargetInvocationException>(() => CreateSystemCore_EnumerableDebugView(null));
ArgumentNullException ane = Assert.IsType<ArgumentNullException>(exc.InnerException);
Assert.Equal("enumerable", ane.ParamName);
}

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

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public void NonGenericEnumerableDebugView_NonEmptySource()
{
IEnumerable source = Enumerable.Range(10, 5).Select(i => (object)i);
object debugView = CreateSystemCore_EnumerableDebugView(source);
Assert.Equal<object>(source.Cast<object>().ToArray(), GetItems<object>(debugView));
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public void GenericEnumerableDebugView_ThrowsForNullSource()
{
Exception exc = Assert.Throws<TargetInvocationException>(() => CreateSystemCore_EnumerableDebugView<int>(null));
ArgumentNullException ane = Assert.IsType<ArgumentNullException>(exc.InnerException);
Assert.Equal("enumerable", ane.ParamName);
}

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

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
public void GenericEnumerableDebugView_NonEmptySource()
{
IEnumerable<int> source = Enumerable.Range(10, 5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace System.Linq.Tests
{
public partial class GroupByTests : EnumerableTests
{
[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
[MemberData(nameof(DebuggerAttributesValid_Data))]
public void DebuggerAttributesValid<TKey, TElement>(IGrouping<TKey, TElement> grouping, string keyString)
{
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Linq/tests/GroupByTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public void EmptyGroupingWithResultCount()
Assert.Equal(0, Enumerable.Empty<int>().GroupBy(i => i, (x, y) => x + y.Count()).Count());
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))]
public static void GroupingKeyIsPublic()
{
// Grouping.Key needs to be public (not explicitly implemented) for the sake of WPF.
Expand Down
3 changes: 3 additions & 0 deletions src/libraries/System.Linq/tests/System.Linq.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AggregateTests.cs" />
<Compile Include="AllTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace System.Linq.Tests
{
public partial class ToLookupTests : EnumerableTests
{
[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsDebuggerTypeProxyAttributeSupported))]
[MemberData(nameof(DebuggerAttributesValid_Data))]
public void DebuggerAttributesValid<TKey, TElement>(ILookup<TKey, TElement> lookup)
{
Expand Down
Loading