40 references to VB
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (40)
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstringTests.cs (40)
107Sources = { VB.WithBody(testStatements) }, 110ExpectedDiagnostics = { VB.DiagnosticAt(0) } 114Sources = { VB.WithBody(fixedStatements) }, 181string testCode = VB.WithBody(WithKey($"thing.Consume(foo.{substring})", 0)); 182string fixedCode = VB.WithBody($"thing.Consume(foo.{asSpan})"); 191ExpectedDiagnostics = { VB.DiagnosticAt(0) } 280string testCode = VB.WithBody(WithKey($"Thing.Consume({testArguments})", 0)); 281string fixedCode = VB.WithBody($"Thing.Consume({fixedArguments})"); 290ExpectedDiagnostics = { VB.DiagnosticAt(0) } 538string testCode = VB.WithBody(WithKey(testExpression, 0)); 539string fixedCode = VB.WithBody(fixedExpression); 552ExpectedDiagnostics = { VB.DiagnosticAt(0) } 624string testCode = VB.WithBody(WithKey(testExpression, 0)); 625string fixedCode = VB.WithBody(fixedExpression); 638ExpectedDiagnostics = { VB.DiagnosticAt(0) } 727string testCode = VB.WithBody(testExpression); 728string fixedCode = VB.WithBody(fixedExpression); 751test.TestState.ExpectedDiagnostics.AddRange(locations.Select(VB.DiagnosticAt)); 792string testCode = VB.WithBody(WithKey(@"C.Consume(foo.Substring(1))", 0), includeImports: false); 793string fixedCode = VB.WithBody(@"C.Consume(foo.AsSpan(1))", includeImports: true); 806ExpectedDiagnostics = { VB.DiagnosticAt(0) } 828string testCode = VB.WithBody(WithKey(@"C.Consume(foo.Substring(1))", 0), includeImports: false); 829string fixedCode = VB.WithBody(@"C.Consume(foo.AsSpan(1))", includeImports: false); 842ExpectedDiagnostics = { VB.DiagnosticAt(0) } 971ExpectedDiagnostics = { VB.DiagnosticAt(0) } 1040VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2), foo.Substring(3))", 0)), 1041VB.WithBody(@"R.Consume(foo.AsSpan(1), foo.AsSpan(2), foo.Substring(3))") 1054VB.WithBody(WithKey(@"R.Consume(7, foo.Substring(2), foo.Substring(3))", 0)), 1055VB.WithBody(@"R.Consume(7, foo.Substring(2), foo.AsSpan(3))") 1076ExpectedDiagnostics = { VB.DiagnosticAt(0) } 1142VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2))", 0)) 1157VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2), foo.Substring(3))", 0)) 1178ExpectedDiagnostics = { VB.DiagnosticAt(0) } 1267string testCode = VB.WithBody(WithKey(testExpression, 0)); 1395string testCode = VB.WithBody(testStatements); 1482string testCode = VB.Usings + @" 1578string testCode = VB.Usings + @" 1588string fixedCode = VB.Usings + @" 1610ExpectedDiagnostics = { VB.DiagnosticAt(0) } 1736string testCode = VB.WithBody(