@@ -22,10 +22,10 @@ public sealed class TypeIsSchemaShapeTest
2222 public async Task ReturnTypeIsSchemaShape ( )
2323 {
2424 var expected = new DiagnosticResult [ ] {
25- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 23 , 13 ) . WithArguments ( "" ) ,
26- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 24 , 13 ) . WithArguments ( " of item bad" ) ,
27- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 30 , 13 ) . WithArguments ( " of item c.Item2" ) ,
28- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 40 , 13 ) . WithArguments ( " of item listen" ) ,
25+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 24 , 13 ) . WithArguments ( "" ) ,
26+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 25 , 13 ) . WithArguments ( " of item bad" ) ,
27+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 31 , 13 ) . WithArguments ( " of item c.Item2" ) ,
28+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 41 , 13 ) . WithArguments ( " of item listen" ) ,
2929 } ;
3030
3131 var test = new VerifyCS . Test { TestCode = Source } ;
@@ -45,10 +45,10 @@ public async Task ReturnTypeIsSchemaShapeChained()
4545 // function where the shape type is a generic type parameter. In this case, we would ideally like the analysis to get
4646 // chained out of their function.
4747 var expected = new DiagnosticResult [ ] {
48- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeParameterDiagnostic . Rule ) . WithLocation ( 18 , 24 ) . WithArguments ( "T" ) ,
49- new DiagnosticResult ( "CS8205" , DiagnosticSeverity . Error ) . WithLocation ( 21 , 52 ) . WithMessage ( "Attributes are not allowed on local function parameters or type parameters" ) ,
50- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeParameterDiagnostic . Rule ) . WithLocation ( 41 , 24 ) . WithArguments ( "T" ) ,
51- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 55 , 26 ) . WithArguments ( " of item text" ) ,
48+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeParameterDiagnostic . Rule ) . WithLocation ( 19 , 24 ) . WithArguments ( "T" ) ,
49+ new DiagnosticResult ( "CS8205" , DiagnosticSeverity . Error ) . WithLocation ( 22 , 52 ) . WithMessage ( "Attributes are not allowed on local function parameters or type parameters" ) ,
50+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeParameterDiagnostic . Rule ) . WithLocation ( 42 , 24 ) . WithArguments ( "T" ) ,
51+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeDiagnostic . Rule ) . WithLocation ( 56 , 26 ) . WithArguments ( " of item text" ) ,
5252 } ;
5353
5454 var test = new VerifyCS . Test { TestCode = SourceChained } ;
@@ -68,17 +68,17 @@ public async Task ReturnTypeIsSchemaShapeClass()
6868 // function where the shape type is a generic type parameter. In this case, we would ideally like the analysis to get
6969 // chained out of their function.
7070 var expected = new DiagnosticResult [ ] {
71- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticField . Rule ) . WithLocation ( 33 , 13 ) . WithArguments ( "Class4" , "F1" ) ,
72- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticConstructor . Rule ) . WithLocation ( 34 , 13 ) . WithArguments ( "Class5" ) ,
73- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticConstructor . Rule ) . WithLocation ( 35 , 13 ) . WithArguments ( "Class6" ) ,
71+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticField . Rule ) . WithLocation ( 34 , 13 ) . WithArguments ( "Class4" , "F1" ) ,
72+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticConstructor . Rule ) . WithLocation ( 35 , 13 ) . WithArguments ( "Class5" ) ,
73+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticConstructor . Rule ) . WithLocation ( 36 , 13 ) . WithArguments ( "Class6" ) ,
7474
75- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticNoArgsSettable . Rule ) . WithLocation ( 36 , 13 ) . WithArguments ( "Class7" , "F1" ) ,
76- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticArgsSettable . Rule ) . WithLocation ( 37 , 13 ) . WithArguments ( "Class8" , "F2" ) ,
77- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticGettable . Rule ) . WithLocation ( 38 , 13 ) . WithArguments ( "Class9" , "F2" ) ,
78- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticCorrespondence . Rule ) . WithLocation ( 39 , 13 ) . WithArguments ( "Class10" ) ,
79- VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticCorrespondence . Rule ) . WithLocation ( 40 , 13 ) . WithArguments ( "Class11" ) ,
75+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticNoArgsSettable . Rule ) . WithLocation ( 37 , 13 ) . WithArguments ( "Class7" , "F1" ) ,
76+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticArgsSettable . Rule ) . WithLocation ( 38 , 13 ) . WithArguments ( "Class8" , "F2" ) ,
77+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticGettable . Rule ) . WithLocation ( 39 , 13 ) . WithArguments ( "Class9" , "F2" ) ,
78+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticCorrespondence . Rule ) . WithLocation ( 40 , 13 ) . WithArguments ( "Class10" ) ,
79+ VerifyCS . Diagnostic ( TypeIsSchemaShapeAnalyzer . ShapeClassDiagnosticCorrespondence . Rule ) . WithLocation ( 41 , 13 ) . WithArguments ( "Class11" ) ,
8080
81- new DiagnosticResult ( "CS0246" , DiagnosticSeverity . Error ) . WithLocation ( 44 , 71 ) . WithMessage ( "The type or namespace name 'MissingClass' could not be found (are you missing a using directive or an assembly reference?)" ) ,
81+ new DiagnosticResult ( "CS0246" , DiagnosticSeverity . Error ) . WithLocation ( 45 , 71 ) . WithMessage ( "The type or namespace name 'MissingClass' could not be found (are you missing a using directive or an assembly reference?)" ) ,
8282 } ;
8383
8484 var test = new VerifyCS . Test { TestCode = SourceClass } ;
0 commit comments