95 references to CSharpSecurityCodeFixVerifier
Microsoft.CodeAnalysis.Analyzers.UnitTests (24)
MetaAnalyzers\CompareSymbolsCorrectlyTests.cs (24)
10using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 226await new VerifyCS.Test 237=> VerifyCS.VerifyCodeFixAsync($$""" 258=> VerifyCS.VerifyAnalyzerAsync($$""" 285await new VerifyCS.Test 314await new VerifyCS.Test 343await new VerifyCS.Test 356=> VerifyCS.VerifyAnalyzerAsync($$""" 373=> VerifyCS.VerifyAnalyzerAsync($$""" 548await new VerifyCS.Test 608await new VerifyCS.Test 712await new VerifyCS.Test 772await new VerifyCS.Test 801await new VerifyCS.Test 811await VerifyCS.VerifyAnalyzerAsync(""" 836await new VerifyCS.Test 1014await new VerifyCS.Test 1287=> new VerifyCS.Test 1321=> new VerifyCS.Test 1345=> new VerifyCS.Test 1377=> new VerifyCS.Test 1458await new VerifyCS.Test 1510await new VerifyCS.Test 1590await new VerifyCS.Test
Roslyn.Diagnostics.Analyzers.UnitTests (71)
DoNotCallGetTestAccessorTests.cs (4)
7using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 20=> VerifyCS.VerifyAnalyzerAsync(""" 72=> VerifyCS.VerifyAnalyzerAsync(""" 122=> VerifyCS.VerifyAnalyzerAsync("""
DoNotCopyValueTests.cs (63)
10using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 23=> new VerifyCS.Test 44await VerifyCS.VerifyAnalyzerAsync(""" 74await VerifyCS.VerifyAnalyzerAsync($$""" 110await VerifyCS.VerifyAnalyzerAsync($$""" 142await VerifyCS.VerifyAnalyzerAsync($$""" 156VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle")); 181await VerifyCS.VerifyAnalyzerAsync($$""" 221await VerifyCS.VerifyAnalyzerAsync($$""" 253=> VerifyCS.VerifyAnalyzerAsync(""" 267VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle")); 271=> VerifyCS.VerifyAnalyzerAsync(""" 299VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 301VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 305=> VerifyCS.VerifyAnalyzerAsync(""" 333VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 335VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 339=> VerifyCS.VerifyAnalyzerAsync(""" 387VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 389VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 391VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(2).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 393VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(3).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"), 395VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(4).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 397VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(5).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"), 399VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(6).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference")); 406=> VerifyCS.VerifyAnalyzerAsync($$""" 418await VerifyCS.VerifyAnalyzerAsync(""" 440=> VerifyCS.VerifyAnalyzerAsync(""" 451=> VerifyCS.VerifyAnalyzerAsync(""" 484=> new VerifyCS.Test 503=> new VerifyCS.Test 608VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference"), 615=> new VerifyCS.Test 635=> new VerifyCS.Test 655=> new VerifyCS.Test 682=> new VerifyCS.Test 724("in", "") => [VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "ParameterReference")], 729var test = new VerifyCS.Test 767=> new VerifyCS.Test 804=> new VerifyCS.Test 847=> new VerifyCS.Test 898=> new VerifyCS.Test 936=> new VerifyCS.Test 965=> new VerifyCS.Test 996=> new VerifyCS.Test 1032await new VerifyCS.Test 1063=> new VerifyCS.Test 1097VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"), 1099VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAssignValueFromReferenceRule).WithLocation(1).WithArguments("CannotCopy"), 1106=> new VerifyCS.Test 1132VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoReturnValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"), 1139=> VerifyCS.VerifyAnalyzerAsync(""" 1166VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference")); 1170=> VerifyCS.VerifyAnalyzerAsync(""" 1179VerifyCS.Diagnostic(AbstractDoNotCopyValue.AvoidNullableWrapperRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle?", "FieldInitializer")); 1184await VerifyCS.VerifyAnalyzerAsync(""" 1209VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoFieldOfCopyableTypeRule).WithLocation(0).WithArguments("CannotCopy", "C2.field2")); 1239await VerifyCS.VerifyAnalyzerAsync(""" 1261VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAutoPropertyRule).WithLocation(0).WithArguments("CannotCopy", "C1.Property3"), 1263VerifyCS.Diagnostic(AbstractDoNotCopyValue.NoAutoPropertyRule).WithLocation(1).WithArguments("CannotCopy", "C2.Property3")); 1326=> new VerifyCS.Test 1377=> new VerifyCS.Test 1430VerifyCS.Diagnostic(AbstractDoNotCopyValue.UnsupportedUseRule).WithLocation(0).WithArguments("S", "LocalReference")
TemporaryArrayAsRefTests.cs (4)
8using VerifyCS = Test.Utilities.CSharpSecurityCodeFixVerifier< 78await new VerifyCS.Test 131await new VerifyCS.Test 158await new VerifyCS.Test