未验证 提交 67cd7db8 编写于 作者: J Julien Couvreur 提交者: GitHub

Enable async-stream tests on Core (#30461)

上级 e96851ef
......@@ -381,7 +381,7 @@ async System.Collections.Generic.IAsyncEnumerable<int> M()
Assert.False(m.IsIterator);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AttributesSynthesized()
{
string source = @"
......@@ -408,7 +408,7 @@ public static async System.Collections.Generic.IAsyncEnumerable<int> M()
});
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AttributesSynthesized_Optional()
{
string source = @"
......@@ -1017,7 +1017,7 @@ async System.Collections.Generic.IAsyncEnumerable<int> M2()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator()
{
......@@ -1090,7 +1090,7 @@ void verifyMembersAndInterfaces(ModuleSymbol module)
}
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_CSharp73()
{
......@@ -1122,7 +1122,7 @@ async System.Collections.Generic.IAsyncEnumerator<int> M()
comp.VerifyDiagnostics();
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_WithReturnOnly()
{
......@@ -1145,7 +1145,7 @@ async System.Collections.Generic.IAsyncEnumerator<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void ReturningIAsyncEnumerator_WithReturn()
{
......@@ -1161,7 +1161,7 @@ System.Collections.Generic.IAsyncEnumerator<int> M()
comp.VerifyDiagnostics();
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_WithReturnAndAwait()
{
......@@ -1185,7 +1185,7 @@ static async System.Collections.Generic.IAsyncEnumerator<int> M(int value)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
[WorkItem(31113, "https://github.com/dotnet/roslyn/issues/31113")]
[WorkItem(31608, "https://github.com/dotnet/roslyn/issues/31608")]
......@@ -1213,7 +1213,7 @@ static System.Collections.Generic.IAsyncEnumerator<int> M(int value)
// This error message is rather poor. Tracked by https://github.com/dotnet/roslyn/issues/31113
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_WithReturnAfterAwait()
{
......@@ -1367,7 +1367,7 @@ public static async System.Collections.Generic.IAsyncEnumerable<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31608, "https://github.com/dotnet/roslyn/issues/31608")]
public void AsyncIterator_WithoutAwait()
{
......@@ -1388,7 +1388,7 @@ public static async System.Collections.Generic.IAsyncEnumerable<int> M()
CompileAndVerify(comp, expectedOutput: "1 END DISPOSAL DONE");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31608, "https://github.com/dotnet/roslyn/issues/31608")]
public void AsyncIterator_WithoutAwait_WithoutAsync()
{
......@@ -1408,7 +1408,7 @@ static System.Collections.Generic.IAsyncEnumerable<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31608, "https://github.com/dotnet/roslyn/issues/31608")]
public void AsyncIterator_WithoutAwait_WithoutAsync_LocalFunction()
{
......@@ -1432,7 +1432,7 @@ static System.Collections.Generic.IAsyncEnumerator<int> local()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31608, "https://github.com/dotnet/roslyn/issues/31608")]
public void Iterator_WithAsync()
{
......@@ -1477,7 +1477,7 @@ public static async System.Collections.Generic.IAsyncEnumerator<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_WithoutAwait()
{
......@@ -1497,7 +1497,7 @@ static async System.Collections.Generic.IAsyncEnumerator<int> M(int value)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31057, "https://github.com/dotnet/roslyn/issues/31057")]
public void AsyncIteratorReturningEnumerator_WithoutYield()
{
......@@ -1517,7 +1517,7 @@ static async System.Collections.Generic.IAsyncEnumerator<int> M(int value)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void CallingMoveNextAsyncTwice()
{
string source = @"
......@@ -1554,7 +1554,7 @@ await using (var enumerator = M().GetAsyncEnumerator())
CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 5");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(30275, "https://github.com/dotnet/roslyn/issues/30275")]
public void CallingGetEnumeratorTwice()
{
......@@ -1630,7 +1630,7 @@ void verifyMembersAndInterfaces(ModuleSymbol module)
}
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(30275, "https://github.com/dotnet/roslyn/issues/30275")]
public void CallingGetEnumeratorTwice2()
{
......@@ -1673,7 +1673,7 @@ await using (var enumerator2 = enumerable.GetAsyncEnumerator())
CompileAndVerify(comp, expectedOutput: "1 2 Stream1:3 4 2 1 2 Stream2:3 4 2 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(30275, "https://github.com/dotnet/roslyn/issues/30275")]
public void CallingGetEnumeratorTwice3()
{
......@@ -1722,7 +1722,7 @@ static async System.Threading.Tasks.Task Main()
CompileAndVerify(comp, expectedOutput: "Stream1:0 Stream2:0 1 2 Stream1:3 4 2 1 2 Stream2:3 4 2 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(30275, "https://github.com/dotnet/roslyn/issues/30275")]
public void CallingGetEnumeratorTwice4()
{
......@@ -1767,7 +1767,7 @@ await foreach (var item2 in enumerable)
CompileAndVerify(comp, expectedOutput: "Stream1:0 1 2 Stream1:3 4 42 Await Stream2:0 1 2 Stream2:3 4 42 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void CallingGetEnumeratorTwice_AfterDisposing()
{
string source = @"
......@@ -2337,7 +2337,7 @@ .maxstack 3
}
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithGenericReturn()
{
string source = @"
......@@ -2367,7 +2367,7 @@ await foreach (var i in M(3))
CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 5");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithGenericReturnFromContainingType()
{
string source = @"
......@@ -2400,7 +2400,7 @@ await foreach (var i in C<int>.M(3))
CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 5");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithParameter()
{
string source = @"
......@@ -2432,7 +2432,7 @@ await foreach (var i in M(10))
CompileAndVerify(comp, expectedOutput: "Start p:10 p:11 Value p:12 End");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithThis()
{
string source = @"
......@@ -2486,7 +2486,7 @@ public static async System.Collections.Generic.IAsyncEnumerable<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithAwaitCompletedAndOneYieldAndOneInvocation()
{
string source = @"
......@@ -2516,7 +2516,7 @@ await foreach (var i in M())
CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithAwaitCompletedAndTwoYields()
{
string source = @"
......@@ -2547,7 +2547,7 @@ await foreach (var i in M())
CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 5 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithYieldAndAwait()
{
string source = @"
......@@ -2599,7 +2599,7 @@ public static async System.Collections.Generic.IAsyncEnumerable<int> M()
CompileAndVerify(comp, expectedOutput: expectedOutput);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithAwaitCompletedAndYieldBreakAndYieldReturn()
{
string source = @"
......@@ -2633,7 +2633,7 @@ await foreach (var i in M())
CompileAndVerify(comp, expectedOutput: "0 1 2 3 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithCustomCode()
{
verify(new[] { AwaitSlow, Write, Yield, AwaitSlow });
......@@ -2747,7 +2747,7 @@ async System.Collections.Generic.IAsyncEnumerable<int> local()
}
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithAwaitAndYieldAndAwait()
{
string source = @"
......@@ -4508,7 +4508,7 @@ async System.Collections.Generic.IAsyncEnumerable<int> M()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithYieldReturnOnly()
{
string source = @"
......@@ -4535,7 +4535,7 @@ await foreach (var i in M())
CompileAndVerify(comp, expectedOutput: "1");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorWithYieldBreakOnly()
{
string source = @"
......@@ -4721,7 +4721,7 @@ async Unknown local()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void DisposeAsyncInBadState()
{
string source = @"
......@@ -4771,7 +4771,7 @@ public static async Task Main()
CompileAndVerify(comp, expectedOutput: "DisposeAsync threw. Already cancelled");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void DisposeAsyncBeforeRunning()
{
string source = @"
......@@ -4793,7 +4793,7 @@ public static async System.Threading.Tasks.Task Main()
CompileAndVerify(comp, expectedOutput: "done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void DisposeAsyncTwiceAfterRunning()
{
string source = @"
......@@ -4947,7 +4947,7 @@ static async Task Main()
CompileAndVerify(comp, expectedOutput: "B1::F;D::F;B1::F;");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void AsyncIteratorReturningEnumerator_UsingCancellationToken()
{
string source = @"
......
......@@ -77,7 +77,7 @@ public static async System.Threading.Tasks.Task Main()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithIAsyncEnumerator()
{
string source = @"
......@@ -99,7 +99,7 @@ async Task M(IAsyncEnumerator<int> enumerator)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithUIntToIntConversion()
{
string source = @"
......@@ -767,7 +767,7 @@ class Element
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithExplicitlyConvertibleElementType()
{
string source = @"
......@@ -825,7 +825,7 @@ class Element
expectedOutput: "NextAsync(0) Current(1) Convert(1) Got(1) NextAsync(1) Current(2) Convert(2) Got(2) NextAsync(2) Current(3) Convert(3) Got(3) NextAsync(3) Dispose(4)");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithCaptureOfIterationVariable()
{
string source = @"
......@@ -867,7 +867,7 @@ public async ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "Got(1) Got(2) Captured(1)");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithGenericIterationVariable()
{
string source = @"
......@@ -924,7 +924,7 @@ public async ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "NextAsync(1) Current(1) Got(1) NextAsync(2) Current(2) Got(2) NextAsync(3) Current(3) Got(3) NextAsync(4) Dispose(4)");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithThrowingGetAsyncEnumerator()
{
string source = @"
......@@ -964,7 +964,7 @@ public ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "exception");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithThrowingMoveNextAsync()
{
string source = @"
......@@ -1007,7 +1007,7 @@ public async ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "dispose exception");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithThrowingCurrent()
{
string source = @"
......@@ -1054,7 +1054,7 @@ public async ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "wait dispose exception");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithThrowingDisposeAsync()
{
string source = @"
......@@ -1855,7 +1855,7 @@ public sealed class Enumerator
Assert.Equal(default, model.GetForEachStatementInfo(foreachSyntax));
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_RefStruct()
{
string source = @"
......@@ -1902,7 +1902,7 @@ public S(int i)
CompileAndVerify(comp, expectedOutput: "1 2 Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_RefReturningCurrent()
{
string source = @"
......@@ -1984,7 +1984,7 @@ public System.Threading.Tasks.Task<bool> MoveNextAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_WithStruct_MoveNextAsyncReturnsTask()
{
string source = @"
......@@ -2037,7 +2037,7 @@ public async ValueTask DisposeAsync()
expectedOutput: "NextAsync(0) Current(0) Got(1) NextAsync(1) Current(1) Got(2) NextAsync(2) Current(2) Got(3) NextAsync(3) Current(3) Got(4) NextAsync(4) DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_MoveNextAsyncReturnsValueTask()
{
string source = @"
......@@ -2100,7 +2100,7 @@ public async ValueTask DisposeAsync()
Assert.True(internalInfo.NeedsDisposal);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31609, "https://github.com/dotnet/roslyn/issues/31609")]
public void TestWithPattern_MoveNextAsyncReturnsAwaitable()
{
......@@ -2160,7 +2160,7 @@ public class Awaiter : System.Runtime.CompilerServices.INotifyCompletion
Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString());
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31609, "https://github.com/dotnet/roslyn/issues/31609")]
public void TestWithPattern_MoveNextAsyncReturnsAwaitable_WithoutGetAwaiter()
{
......@@ -2194,7 +2194,7 @@ public class Awaitable
VerifyEmptyForEachStatementInfo(comp);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31609, "https://github.com/dotnet/roslyn/issues/31609")]
public void TestWithPattern_MoveNextAsyncReturnsAwaitable_WithoutIsCompleted()
{
......@@ -2245,7 +2245,7 @@ private static void VerifyEmptyForEachStatementInfo(CSharpCompilation comp)
Assert.Null(info.ElementType);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31609, "https://github.com/dotnet/roslyn/issues/31609")]
public void TestWithPattern_MoveNextAsyncReturnsAwaitable_WithoutGetResult()
{
......@@ -2285,7 +2285,7 @@ public class Awaiter : System.Runtime.CompilerServices.INotifyCompletion
VerifyEmptyForEachStatementInfo(comp);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(31609, "https://github.com/dotnet/roslyn/issues/31609")]
public void TestWithPattern_MoveNextAsyncReturnsAwaitable_WithoutOnCompleted()
{
......@@ -2326,7 +2326,7 @@ public class Awaiter
VerifyEmptyForEachStatementInfo(comp);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_MoveNextAsyncReturnsBadType()
{
string source = @"
......@@ -2362,7 +2362,7 @@ public class AsyncEnumerator
Assert.Null(info.ElementType);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_WithUnsealed()
{
string source = @"
......@@ -2609,7 +2609,7 @@ .maxstack 3
}", sequencePoints: "C+<Main>d__0.MoveNext", source: source + s_IAsyncEnumerable);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPattern_WithIAsyncDisposable()
{
string source = @"
......@@ -2774,7 +2774,7 @@ IAsyncEnumerator<int> IAsyncEnumerable<int>.GetAsyncEnumerator(System.Threading.
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface()
{
string source = @"
......@@ -2847,7 +2847,7 @@ async ValueTask IAsyncDisposable.DisposeAsync()
Assert.True(internalInfo.NeedsDisposal);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface_OnStruct_ImplicitInterfaceImplementation()
{
string source = @"
......@@ -3114,7 +3114,7 @@ .maxstack 3
}");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface_WithEarlyCompletion1()
{
string source = @"
......@@ -3166,7 +3166,7 @@ public ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "NextAsync(2) Current(3) Got(3) NextAsync(3) Dispose(4) Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface_WithBreakAndContinue()
{
string source = @"
......@@ -3221,7 +3221,7 @@ public async ValueTask DisposeAsync()
expectedOutput: "NextAsync(0) Current(1) Got(1) NextAsync(1) Current(2) Continue(2) NextAsync(2) Current(3) Continue(3) NextAsync(3) Current(4) Break Dispose(4) Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface_WithGoto()
{
string source = @"
......@@ -3277,7 +3277,7 @@ public async ValueTask DisposeAsync()
expectedOutput: "NextAsync(0) Current(1) Got(1) NextAsync(1) Current(2) Continue(2) NextAsync(2) Current(3) Continue(3) NextAsync(3) Current(4) Goto Dispose(4) Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterface_WithStruct()
{
string source = @"
......@@ -3381,7 +3381,7 @@ IAsyncEnumerator<int> IAsyncEnumerable<int>.GetAsyncEnumerator(System.Threading.
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullCollection()
{
string source = @"
......@@ -3421,7 +3421,7 @@ internal struct AsyncEnumerator : IAsyncEnumerator<int>
CompileAndVerify(comp, expectedOutput: "Success");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestInCatch()
{
string source = @"
......@@ -3511,7 +3511,7 @@ IAsyncEnumerator<int> IAsyncEnumerable<int>.GetAsyncEnumerator(System.Threading.
comp.VerifyDiagnostics();
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithConversionToElement()
{
string source = @"
......@@ -3592,7 +3592,7 @@ class Element
Assert.True(internalInfo.NeedsDisposal);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullableCollection()
{
string source = @"
......@@ -3665,7 +3665,7 @@ public async ValueTask DisposeAsync()
Assert.True(internalInfo.NeedsDisposal);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullableCollection2()
{
string source = @"
......@@ -3699,7 +3699,7 @@ IAsyncEnumerator<int> IAsyncEnumerable<int>.GetAsyncEnumerator(System.Threading.
CompileAndVerify(comp, expectedOutput: "Success");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterfaceAndDeconstruction()
{
string source = @"
......@@ -3803,7 +3803,7 @@ public static class Extensions
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithPatternAndDeconstructionOfTuple()
{
string source = @"
......@@ -3869,7 +3869,7 @@ public async ValueTask DisposeAsync()
Assert.Equal(ConversionKind.Identity, info.CurrentConversion.Kind);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithInterfaceAndDeconstruction_ManualIteration()
{
string source = @"
......@@ -4027,7 +4027,7 @@ public IAsyncEnumerator<int> GetAsyncEnumerator(System.Threading.CancellationTok
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithGenericCollection()
{
string source = @"
......@@ -4382,7 +4382,7 @@ await foreach (var i in c)
Assert.Null(info.DisposeMethod);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void GetAsyncEnumerator_CancellationTokenMustBeOptional()
{
string source = @"
......@@ -4409,7 +4409,7 @@ public IAsyncEnumerator<int> GetAsyncEnumerator(System.Threading.CancellationTok
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void GetAsyncEnumerator_WithOptionalParameter()
{
string source = @"
......@@ -4432,7 +4432,7 @@ public IAsyncEnumerator<int> GetAsyncEnumerator(int opt = 0)
comp.VerifyDiagnostics();
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void GetAsyncEnumerator_WithParams()
{
string source = @"
......@@ -4468,7 +4468,7 @@ public int Current
CompileAndVerify(comp, expectedOutput: "MoveNextAsync");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal()
{
......@@ -4511,7 +4511,7 @@ public async Task DisposeAsync()
CompileAndVerify(comp, expectedOutput: "MoveNextAsync DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_TwoOverloads()
{
......@@ -4556,7 +4556,7 @@ public Task DisposeAsync(params string[] s)
CompileAndVerify(comp, expectedOutput: "MoveNextAsync DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_NoExtensions()
{
......@@ -4599,7 +4599,7 @@ public static class Extension
CompileAndVerify(comp, expectedOutput: "MoveNextAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_NoExtensions_TwoExtensions()
{
......@@ -4647,7 +4647,7 @@ public static class Extension2
CompileAndVerify(comp, expectedOutput: "MoveNextAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_InterfacePreferredToInstanceMethod()
{
......@@ -4691,7 +4691,7 @@ async ValueTask System.IAsyncDisposable.DisposeAsync()
CompileAndVerify(comp, expectedOutput: "MoveNextAsync DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_ReturnsVoid()
{
......@@ -4727,7 +4727,7 @@ public void DisposeAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_ReturnsInt()
{
......@@ -4770,7 +4770,7 @@ public int DisposeAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_ReturnsAwaitable()
{
......@@ -4825,7 +4825,7 @@ public class Awaiter : System.Runtime.CompilerServices.INotifyCompletion
CompileAndVerify(comp, expectedOutput: "MoveNextAsync DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_ReturnsTask()
{
......@@ -4869,7 +4869,7 @@ public async Task DisposeAsync()
CompileAndVerify(comp, expectedOutput: "MoveNextAsync DisposeAsync Done");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void PatternBasedDisposal_ReturnsTaskOfInt()
{
......
......@@ -156,7 +156,7 @@ public static async Task Main()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestInAsyncAnonymousMethod()
{
string source = @"
......@@ -298,7 +298,7 @@ public void Dispose()
comp.VerifyDiagnostics();
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestInCatchBlock()
{
string source = @"
......@@ -413,7 +413,7 @@ async System.Threading.Tasks.Task innerLocal()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestInFinallyBlock()
{
string source = @"
......@@ -448,7 +448,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestThrowingDisposeAsync()
{
string source = @"
......@@ -484,7 +484,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using caught message");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestRegularAwaitInFinallyBlock()
{
string source = @"
......@@ -761,7 +761,7 @@ await using (var x = new C())
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithDeclaration()
{
string source = @"
......@@ -791,7 +791,7 @@ public void Dispose()
CompileAndVerify(comp, expectedOutput: "body DisposeAsync");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestIAsyncDisposableInRegularUsing()
{
string source = @"
......@@ -871,7 +871,7 @@ public void Dispose()
CompileAndVerify(comp, expectedOutput: "body Dispose");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestIDisposableInAwaitUsing()
{
string source = @"
......@@ -921,7 +921,7 @@ public void Dispose()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithDynamicDeclaration_ExplicitInterfaceImplementation()
{
string source = @"
......@@ -948,7 +948,7 @@ System.Threading.Tasks.ValueTask System.IAsyncDisposable.DisposeAsync()
CompileAndVerify(comp, expectedOutput: "body DisposeAsync end");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithDynamicDeclaration()
{
string source = @"
......@@ -975,7 +975,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "body DisposeAsync end");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithExpression()
{
string source = @"
......@@ -1149,7 +1149,7 @@ .maxstack 3
");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullExpression()
{
string source = @"
......@@ -1192,7 +1192,7 @@ await using (Main)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithDynamicExpression()
{
string source = @"
......@@ -1219,7 +1219,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "body DisposeAsync");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithStructExpression()
{
string source = @"
......@@ -1388,7 +1388,7 @@ .maxstack 3
");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullableExpression()
{
string source = @"
......@@ -1415,7 +1415,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "body DisposeAsync");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithNullNullableExpression()
{
string source = @"
......@@ -1478,7 +1478,7 @@ async void L1()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithMultipleResources()
{
string source = @"
......@@ -1511,7 +1511,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "ctor1 ctor2 body dispose2_start dispose2_end dispose1_start dispose1_end");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithMultipleResourcesAndException()
{
string source = @"
......@@ -1550,7 +1550,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "ctor1 ctor2 body dispose2 dispose1 caught");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestWithMultipleResourcesAndExceptionInSecondResource()
{
string source = @"
......@@ -1658,7 +1658,7 @@ public class D
Assert.True(first.GetHashCode() == another.GetHashCode());
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_ExtensionMethod()
{
......@@ -1689,7 +1689,7 @@ public static System.Threading.Tasks.ValueTask DisposeAsync(this C c)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_TwoOverloads()
{
......@@ -1717,7 +1717,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync(params string[] s)
CompileAndVerify(comp, expectedOutput: "dispose");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_Expression_ExtensionMethod()
{
......@@ -1748,7 +1748,7 @@ public static System.Threading.Tasks.ValueTask DisposeAsync(this C c)
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_Expression_InstanceMethod()
{
......@@ -1778,7 +1778,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod()
{
......@@ -1808,7 +1808,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InterfacePreferredOverInstanceMethod()
{
......@@ -1840,7 +1840,7 @@ public System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_OptionalParameter()
{
......@@ -1870,7 +1870,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync(int i = 0)
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_ParamsParameter()
{
......@@ -1900,7 +1900,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync(params int[] x)
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end(0) return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_ReturningVoid()
{
......@@ -1928,7 +1928,7 @@ public void DisposeAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_ReturningInt()
{
......@@ -1955,7 +1955,7 @@ public int DisposeAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_Inaccessible()
{
......@@ -1988,7 +1988,7 @@ private System.Threading.Tasks.ValueTask DisposeAsync()
);
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_InstanceMethod_UsingDeclaration()
{
......@@ -2017,7 +2017,7 @@ public async System.Threading.Tasks.ValueTask DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_Awaitable()
{
......@@ -2057,7 +2057,7 @@ public class Awaiter : System.Runtime.CompilerServices.INotifyCompletion
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_ReturnsTask()
{
......@@ -2086,7 +2086,7 @@ public async System.Threading.Tasks.Task DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
[WorkItem(32316, "https://github.com/dotnet/roslyn/issues/32316")]
public void TestPatternBasedDisposal_ReturnsTaskOfInt()
{
......@@ -2117,7 +2117,7 @@ public async System.Threading.Tasks.Task<int> DisposeAsync()
CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
}
[ConditionalFact(typeof(WindowsDesktopOnly))]
[Fact]
public void TestInRegularMethod()
{
string source = @"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册