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