Skip to content

Commit

Permalink
Use attributes consistently in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Sep 11, 2022
1 parent e87c8eb commit c35952b
Show file tree
Hide file tree
Showing 250 changed files with 3,510 additions and 7,020 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ internal class Program
");
}

[WorkItem(48899, "https://github.com/dotnet/roslyn/issues/48899")]
[Fact]
[Fact, WorkItem(48899, "https://github.com/dotnet/roslyn/issues/48899")]
public async Task TestAbstractMethod()
{
await VerifyCS.VerifyCodeFixAsync(@"
Expand All @@ -503,8 +502,7 @@ public abstract class TestClass
");
}

[WorkItem(48899, "https://github.com/dotnet/roslyn/issues/48899")]
[Fact]
[Fact, WorkItem(48899, "https://github.com/dotnet/roslyn/issues/48899")]
public async Task TestOverriddenMethod()
{
await VerifyCS.VerifyCodeFixAsync(@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ System.Func<int> M(int i, int j)
}.RunAsync();
}

[WorkItem(37907, "https://github.com/dotnet/roslyn/issues/37907")]
[Fact]
[Fact, WorkItem(37907, "https://github.com/dotnet/roslyn/issues/37907")]
public async Task TestNested_03()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -274,8 +273,7 @@ public bool ValueBoolean()
}
}");
}
[WorkItem(44572, "https://github.com/dotnet/roslyn/issues/44572")]
[Fact]
[Fact, WorkItem(44572, "https://github.com/dotnet/roslyn/issues/44572")]
public async Task TestImplicitConversion()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,7 @@ void M(int i)
}.RunAsync();
}

[WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
[Fact]
[Fact, WorkItem(42368, "https://github.com/dotnet/roslyn/issues/42368")]
public async Task TestOnMultiCaseSection_CSharp9()
{
var testCode = @"class Program
Expand Down Expand Up @@ -719,8 +718,7 @@ int M(int i)
}");
}

[WorkItem(37873, "https://github.com/dotnet/roslyn/issues/37873")]
[Fact]
[Fact, WorkItem(37873, "https://github.com/dotnet/roslyn/issues/37873")]
public async Task TestTrivia_02()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -865,8 +863,7 @@ void M(int i)
}");
}

[WorkItem(37947, "https://github.com/dotnet/roslyn/issues/37947")]
[Fact]
[Fact, WorkItem(37947, "https://github.com/dotnet/roslyn/issues/37947")]
public async Task TestMultiLabelWithDefault()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -901,8 +898,7 @@ public static string FromDay(DayOfWeek dayOfWeek)
}");
}

[WorkItem(37949, "https://github.com/dotnet/roslyn/issues/37949")]
[Fact]
[Fact, WorkItem(37949, "https://github.com/dotnet/roslyn/issues/37949")]
public async Task TestMissingOnUseInNextStatement()
{
var code = @"using System;
Expand All @@ -924,8 +920,7 @@ public static void Throw(int index)
await VerifyCS.VerifyCodeFixAsync(code, code);
}

[WorkItem(36876, "https://github.com/dotnet/roslyn/issues/36876")]
[Fact]
[Fact, WorkItem(36876, "https://github.com/dotnet/roslyn/issues/36876")]
public async Task TestDeclarationInOuterScope()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -1007,8 +1002,7 @@ public static void Test()
}");
}

[WorkItem(37872, "https://github.com/dotnet/roslyn/issues/37872")]
[Fact]
[Fact, WorkItem(37872, "https://github.com/dotnet/roslyn/issues/37872")]
public async Task TestMissingFixOnDirectives()
{
var code = @"class Program
Expand Down Expand Up @@ -1038,8 +1032,7 @@ static int GetValue(int input)
await VerifyCS.VerifyCodeFixAsync(code, code);
}

[WorkItem(37872, "https://github.com/dotnet/roslyn/issues/37872")]
[Fact]
[Fact, WorkItem(37872, "https://github.com/dotnet/roslyn/issues/37872")]
public async Task TestMissingFixAllOnDirectives()
{
var code = @"class Program
Expand Down Expand Up @@ -1113,8 +1106,7 @@ static int GetValue(int input)
}.RunAsync();
}

[WorkItem(37950, "https://github.com/dotnet/roslyn/issues/37950")]
[Fact]
[Fact, WorkItem(37950, "https://github.com/dotnet/roslyn/issues/37950")]
public async Task TestShouldNotCastNullOnNullableValueType_ReturnStatement()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -1144,8 +1136,7 @@ await VerifyCS.VerifyCodeFixAsync(
}");
}

[WorkItem(37950, "https://github.com/dotnet/roslyn/issues/37950")]
[Fact]
[Fact, WorkItem(37950, "https://github.com/dotnet/roslyn/issues/37950")]
public async Task TestShouldNotCastNullOnNullableValueType_Assignment()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -1176,8 +1167,7 @@ public static void Test(string name)
}");
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_Interfaces()
{
var input =
Expand Down Expand Up @@ -1244,8 +1234,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_Interfaces2()
{
var input =
Expand Down Expand Up @@ -1312,8 +1301,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_Interfaces3()
{
var input =
Expand Down Expand Up @@ -1380,8 +1368,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_ClassInheritance()
{
var input =
Expand Down Expand Up @@ -1456,8 +1443,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_ClassInheritance2()
{
var input =
Expand Down Expand Up @@ -1524,8 +1510,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestImplicitDeclaration_ClassInheritance()
{
var input =
Expand Down Expand Up @@ -1592,8 +1577,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestImplicitDeclaration_ClassInheritance2()
{
var input =
Expand Down Expand Up @@ -1660,8 +1644,7 @@ public static void Test(string name)
}.RunAsync();
}

[WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
[Fact]
[Fact, WorkItem(38771, "https://github.com/dotnet/roslyn/issues/38771")]
public async Task TestExplicitDeclaration_AllCasesDefaultLiteral()
{
var input =
Expand Down Expand Up @@ -1890,8 +1873,7 @@ public static void Test()
}.RunAsync();
}

[WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
[Fact]
[Fact, WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
public async Task TestNotWithRefReturns()
{
var code = @"using System;
Expand All @@ -1911,8 +1893,7 @@ static ref int GetRef(int[] mem, int addr, int mode)
await VerifyCS.VerifyCodeFixAsync(code, code);
}

[WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
[Fact]
[Fact, WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
public async Task TestNotWithRefAssignment()
{
var code = @"using System;
Expand All @@ -1934,8 +1915,7 @@ static ref int GetRef(int[] mem, int addr, int mode)
await VerifyCS.VerifyCodeFixAsync(code, code);
}

[WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
[Fact]
[Fact, WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
public async Task TestNotWithRefConditionalAssignment()
{
var code = @"using System;
Expand All @@ -1957,8 +1937,7 @@ static ref int GetRef(int[] mem, int addr, int mode)
await VerifyCS.VerifyCodeFixAsync(code, code);
}

[WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
[Fact]
[Fact, WorkItem(40198, "https://github.com/dotnet/roslyn/issues/40198")]
public async Task TestWithRefInsideConditionalAssignment()
{
await VerifyCS.VerifyCodeFixAsync(
Expand Down Expand Up @@ -2026,8 +2005,7 @@ public async Task TopLevelStatement()
await test.RunAsync();
}

[WorkItem(44449, "https://github.com/dotnet/roslyn/issues/44449")]
[Fact]
[Fact, WorkItem(44449, "https://github.com/dotnet/roslyn/issues/44449")]
public async Task TopLevelStatement_FollowedWithThrow()
{
// We should be rewriting the declaration for 'j' to get 'var j = i switch ...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ void M()
await VerifyCS.VerifyCodeFixAsync(text, text);
}

[WorkItem(47129, "https://github.com/dotnet/roslyn/issues/47129")]
[Fact]
[Fact, WorkItem(47129, "https://github.com/dotnet/roslyn/issues/47129")]
public async Task NestedInGenericType()
{
var text = @"class Test
Expand Down Expand Up @@ -276,8 +275,7 @@ void M()
await VerifyCS.VerifyCodeFixAsync(text, expected);
}

[WorkItem(47129, "https://github.com/dotnet/roslyn/issues/47129")]
[Fact]
[Fact, WorkItem(47129, "https://github.com/dotnet/roslyn/issues/47129")]
public async Task NestedInGenericType2()
{
var text = @"using System;
Expand Down Expand Up @@ -305,8 +303,7 @@ public void M()
await VerifyCS.VerifyCodeFixAsync(text, expected);
}

[WorkItem(54233, "https://github.com/dotnet/roslyn/issues/54233")]
[Fact]
[Fact, WorkItem(54233, "https://github.com/dotnet/roslyn/issues/54233")]
public async Task NotOnVoid()
{
var text = @"
Expand Down
6 changes: 2 additions & 4 deletions src/Analyzers/CSharp/Tests/HideBase/HideBaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ class App : Application
}");
}

[WorkItem(18391, "https://github.com/dotnet/roslyn/issues/18391")]
[Fact]
[Fact, WorkItem(18391, "https://github.com/dotnet/roslyn/issues/18391")]
public async Task TestAddNewToConstant()
{
await TestInRegularAndScriptAsync(
Expand All @@ -131,8 +130,7 @@ class App : Application
}");
}

[WorkItem(14455, "https://github.com/dotnet/roslyn/issues/14455")]
[Fact]
[Fact, WorkItem(14455, "https://github.com/dotnet/roslyn/issues/14455")]
public async Task TestAddNewToConstantInternalFields()
{
await TestInRegularAndScriptAsync(
Expand Down
Loading

0 comments on commit c35952b

Please sign in to comment.