95 references to CSharpSecurityCodeFixVerifier
Microsoft.CodeAnalysis.Analyzers.UnitTests (24)
MetaAnalyzers\CompareSymbolsCorrectlyTests.cs (24)
10using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 224await new VerifyCS.Test 252await VerifyCS.VerifyCodeFixAsync(source, fixedSource); 276await VerifyCS.VerifyAnalyzerAsync(source); 291await new VerifyCS.Test 320await new VerifyCS.Test 349await new VerifyCS.Test 376await VerifyCS.VerifyAnalyzerAsync(source); 393await VerifyCS.VerifyAnalyzerAsync(source); 575await new VerifyCS.Test 635await new VerifyCS.Test 739await new VerifyCS.Test 797await new VerifyCS.Test 826await new VerifyCS.Test 836await VerifyCS.VerifyAnalyzerAsync(@" 859await new VerifyCS.Test 1033await new VerifyCS.Test 1303await new VerifyCS.Test 1338await new VerifyCS.Test 1363await new VerifyCS.Test 1396await new VerifyCS.Test 1476await new VerifyCS.Test 1528await new VerifyCS.Test 1608await new VerifyCS.Test
Roslyn.Diagnostics.Analyzers.UnitTests (71)
DoNotCallGetTestAccessorTests.cs (4)
7using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 45await VerifyCS.VerifyAnalyzerAsync(source); 100await VerifyCS.VerifyAnalyzerAsync(source); 174await VerifyCS.VerifyAnalyzerAsync(source);
DoNotCopyValueTests.cs (63)
10using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 24await new VerifyCS.Test 46await VerifyCS.VerifyAnalyzerAsync(@" 75await VerifyCS.VerifyAnalyzerAsync($@" 110await VerifyCS.VerifyAnalyzerAsync($@" 141await VerifyCS.VerifyAnalyzerAsync($@" 155VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle")); 179await VerifyCS.VerifyAnalyzerAsync($@" 218await VerifyCS.VerifyAnalyzerAsync($@" 250await VerifyCS.VerifyAnalyzerAsync(@" 264VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle")); 270await VerifyCS.VerifyAnalyzerAsync(@" 298VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 300VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 306await VerifyCS.VerifyAnalyzerAsync(@" 334VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 336VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 342await VerifyCS.VerifyAnalyzerAsync(@" 390VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 392VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 394VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(2).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 396VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(3).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 398VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(4).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 400VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(5).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 402VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(6).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 411await VerifyCS.VerifyAnalyzerAsync($@" 424await VerifyCS.VerifyAnalyzerAsync(@" 446await VerifyCS.VerifyAnalyzerAsync(@" 459await VerifyCS.VerifyAnalyzerAsync(@" 507await new VerifyCS.Test 615await new VerifyCS.Test 624VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference"), 649await new VerifyCS.Test 675await new VerifyCS.Test 706await new VerifyCS.Test 745await new VerifyCS.Test 789("in", "") => new[] { VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "ParameterReference") }, 794var test = new VerifyCS.Test 838await new VerifyCS.Test 881await new VerifyCS.Test 940await new VerifyCS.Test 979await new VerifyCS.Test 1013await new VerifyCS.Test 1047await new VerifyCS.Test 1082await new VerifyCS.Test 1124await new VerifyCS.Test 1164await new VerifyCS.Test 1170VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"), 1172VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(1).WithArguments("CannotCopy"), 1203await new VerifyCS.Test 1209VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoReturnValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"), 1218await VerifyCS.VerifyAnalyzerAsync(@" 1245VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference")); 1251await VerifyCS.VerifyAnalyzerAsync(@" 1260VerifyCS.Diagnostic(AbstractDoNotCopyValue.AvoidNullableWrapperRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle?", "FieldInitializer")); 1266await VerifyCS.VerifyAnalyzerAsync(@" 1291VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoFieldOfCopyableTypeRule).WithLocation(0).WithArguments("CannotCopy", "C2.field2")); 1321await VerifyCS.VerifyAnalyzerAsync(@" 1343VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAutoPropertyRule).WithLocation(0).WithArguments("CannotCopy", "C1.Property3"), 1345VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAutoPropertyRule).WithLocation(1).WithArguments("CannotCopy", "C2.Property3")); 1454await new VerifyCS.Test 1513await new VerifyCS.Test 1519VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("S", "LocalReference")
TemporaryArrayAsRefTests.cs (4)
8using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 72await new VerifyCS.Test 121await new VerifyCS.Test 146await new VerifyCS.Test